Java Code Examples for android.view.View.getPivotX()

The following are Jave code examples for showing how to use getPivotX() of the android.view.View class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: photo-editor-android   File: MultiTouchListener.java   Source Code and License Vote up 7 votes
private static void computeRenderOffset(View view, float pivotX, float pivotY) {
    if (view.getPivotX() == pivotX && view.getPivotY() == pivotY) {
        return;
    }

    float[] prevPoint = {0.0f, 0.0f};
    view.getMatrix().mapPoints(prevPoint);

    view.setPivotX(pivotX);
    view.setPivotY(pivotY);

    float[] currPoint = {0.0f, 0.0f};
    view.getMatrix().mapPoints(currPoint);

    float offsetX = currPoint[0] - prevPoint[0];
    float offsetY = currPoint[1] - prevPoint[1];

    view.setTranslationX(view.getTranslationX() - offsetX);
    view.setTranslationY(view.getTranslationY() - offsetY);
}
 
Example 2
Project: airgram   File: ViewProxy.java   Source Code and License Vote up 6 votes
public static float getPivotX(View view) {
    if (View10.NEED_PROXY) {
        return View10.wrap(view).getPivotX();
    } else {
        return view.getPivotX();
    }
}
 
Example 3
Project: PlusGram   File: ViewProxy.java   Source Code and License Vote up 6 votes
public static float getPivotX(View view) {
    if (View10.NEED_PROXY) {
        return View10.wrap(view).getPivotX();
    } else {
        return view.getPivotX();
    }
}
 
Example 4
Project: LuaViewPlayground   File: ViewHelper.java   Source Code and License Vote up 5 votes
static float getPivotX(View view) {
    return view.getPivotX();
}
 
Example 5
Project: letv   File: ViewCompatHC.java   Source Code and License Vote up 5 votes
public static float getPivotX(View view) {
    return view.getPivotX();
}
 
Example 6
Project: exciting-app   File: ViewHelper.java   Source Code and License Vote up 5 votes
static float getPivotX(View view) {
    return view.getPivotX();
}
 
Example 7
Project: boohee_v5.6   File: ViewHelper.java   Source Code and License Vote up 5 votes
static float getPivotX(View view) {
    return view.getPivotX();
}
 
Example 8
Project: boohee_v5.6   File: ViewCompatHC.java   Source Code and License Vote up 5 votes
public static float getPivotX(View view) {
    return view.getPivotX();
}
 
Example 9
Project: android-project-gallery   File: ViewHelper.java   Source Code and License Vote up 5 votes
static float getPivotX(View view) {
    return view.getPivotX();
}