Java Code Examples for android.view.View#getPivotY()
The following examples show how to use
android.view.View#getPivotY() .
These examples are extracted from open source projects.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: PhotoEditor File: MultiTouchListener.java License: MIT License | 6 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
Source Project: photo-editor-android File: MultiTouchListener.java License: MIT License | 6 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 3
Source Project: DevUtils File: ViewUtils.java License: Apache License 2.0 | 5 votes |
/** * 获取竖直方向偏转量 * @param view {@link View} * @return 竖直方向偏转量 */ public static float getPivotY(final View view) { if (view != null) { return view.getPivotY(); } return 0f; }
Example 4
Source Project: FoldableLayout File: UnfoldableView.java License: Apache License 2.0 | 5 votes |
void setView(View view, int width, int height) { LayoutParams params = new LayoutParams(width, height, Gravity.CENTER_HORIZONTAL); addView(view, params); // Setting temporary pivotal point, see #onMeasure() origPivotY = view.getPivotY(); view.setPivotY(0f); }
Example 5
Source Project: imsdk-android File: ViewHelper.java License: MIT License | 4 votes |
static float getPivotY(View view) { return view.getPivotY(); }
Example 6
Source Project: timecat File: ViewHelper.java License: Apache License 2.0 | 4 votes |
static float getPivotY(View view) { return view.getPivotY(); }
Example 7
Source Project: letv File: ViewCompatHC.java License: Apache License 2.0 | 4 votes |
public static float getPivotY(View view) { return view.getPivotY(); }
Example 8
Source Project: android-project-wo2b File: ViewHelper.java License: Apache License 2.0 | 4 votes |
static float getPivotY(View view) { return view.getPivotY(); }
Example 9
Source Project: MiBandDecompiled File: a.java License: Apache License 2.0 | 4 votes |
static float c(View view) { return view.getPivotY(); }
Example 10
Source Project: Mover File: ViewHelper.java License: Apache License 2.0 | 4 votes |
static float getPivotY(View view) { return view.getPivotY(); }
Example 11
Source Project: XDroidAnimation File: ViewHelper.java License: Apache License 2.0 | 4 votes |
public static float getPivotY(View view) { return view.getPivotY(); }
Example 12
Source Project: adt-leanback-support File: ViewCompatHC.java License: Apache License 2.0 | 4 votes |
public static float getPivotY(View view) { return view.getPivotY(); }
Example 13
Source Project: KJFrameForAndroid File: ViewHelper.java License: Apache License 2.0 | 4 votes |
static float getPivotY(View view) { return view.getPivotY(); }
Example 14
Source Project: UltimateAndroid File: ViewHelper.java License: Apache License 2.0 | 4 votes |
static float getPivotY(View view) { return view.getPivotY(); }
Example 15
Source Project: Auie File: UEViewHelper.java License: GNU General Public License v2.0 | 4 votes |
static float getPivotY(View view) { return view.getPivotY(); }