Loading api/current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -47548,6 +47548,7 @@ package android.view { method public boolean isOpaque(); method protected boolean isPaddingOffsetRequired(); method public boolean isPaddingRelative(); method public boolean isPivotSet(); method public boolean isPressed(); method public boolean isSaveEnabled(); method public boolean isSaveFromParentEnabled(); Loading Loading @@ -47666,6 +47667,7 @@ package android.view { method public boolean requestRectangleOnScreen(android.graphics.Rect, boolean); method public final void requestUnbufferedDispatch(android.view.MotionEvent); method public final <T extends android.view.View> T requireViewById(int); method public void resetPivot(); method public static int resolveSize(int, int); method public static int resolveSizeAndState(int, int, int); method public boolean restoreDefaultFocus(); core/java/android/view/RenderNode.java +7 −0 Original line number Diff line number Diff line Loading @@ -687,6 +687,11 @@ public class RenderNode { return nIsPivotExplicitlySet(mNativeRenderNode); } /** lint */ public boolean resetPivot() { return nResetPivot(mNativeRenderNode); } /** * Sets the camera distance for the display list. Refer to * {@link View#setCameraDistance(float)} for more information on how to Loading Loading @@ -903,6 +908,8 @@ public class RenderNode { @CriticalNative private static native boolean nSetPivotX(long renderNode, float pivotX); @CriticalNative private static native boolean nResetPivot(long renderNode); @CriticalNative private static native boolean nSetLayerType(long renderNode, int layerType); @CriticalNative private static native boolean nSetLayerPaint(long renderNode, long paint); Loading core/java/android/view/View.java +22 −0 Original line number Diff line number Diff line Loading @@ -14842,6 +14842,28 @@ public class View implements Drawable.Callback, KeyEvent.Callback, } } /** * Returns whether or not a pivot has been set by a call to {@link #setPivotX(float)} or * {@link #setPivotY(float)}. If no pivot has been set then the pivot will be the center * of the view. * * @return True if a pivot has been set, false if the default pivot is being used */ public boolean isPivotSet() { return mRenderNode.isPivotExplicitlySet(); } /** * Clears any pivot previously set by a call to {@link #setPivotX(float)} or * {@link #setPivotY(float)}. After calling this {@link #isPivotSet()} will be false * and the pivot used for rotation will return to default of being centered on the view. */ public void resetPivot() { if (mRenderNode.resetPivot()) { invalidateViewProperty(false, false); } } /** * The opacity of the view. This is a value from 0 to 1, where 0 means the view is * completely transparent and 1 means the view is completely opaque. core/jni/android_view_RenderNode.cpp +5 −0 Original line number Diff line number Diff line Loading @@ -266,6 +266,10 @@ static jboolean android_view_RenderNode_setPivotY(jlong renderNodePtr, float py) return SET_AND_DIRTY(setPivotY, py, RenderNode::GENERIC); } static jboolean android_view_RenderNode_resetPivot(jlong renderNodePtr) { return SET_AND_DIRTY(resetPivot, /* void */, RenderNode::GENERIC); } static jboolean android_view_RenderNode_setCameraDistance(jlong renderNodePtr, float distance) { return SET_AND_DIRTY(setCameraDistance, distance, RenderNode::GENERIC); } Loading Loading @@ -613,6 +617,7 @@ static const JNINativeMethod gMethods[] = { { "nSetScaleY", "(JF)Z", (void*) android_view_RenderNode_setScaleY }, { "nSetPivotX", "(JF)Z", (void*) android_view_RenderNode_setPivotX }, { "nSetPivotY", "(JF)Z", (void*) android_view_RenderNode_setPivotY }, { "nResetPivot", "(J)Z", (void*) android_view_RenderNode_resetPivot }, { "nSetCameraDistance", "(JF)Z", (void*) android_view_RenderNode_setCameraDistance }, { "nSetLeft", "(JI)Z", (void*) android_view_RenderNode_setLeft }, { "nSetTop", "(JI)Z", (void*) android_view_RenderNode_setTop }, Loading libs/hwui/RenderProperties.h +4 −0 Original line number Diff line number Diff line Loading @@ -328,6 +328,10 @@ public: bool isPivotExplicitlySet() const { return mPrimitiveFields.mPivotExplicitlySet; } bool resetPivot() { return RP_SET_AND_DIRTY(mPrimitiveFields.mPivotExplicitlySet, false); } bool setCameraDistance(float distance) { if (distance != getCameraDistance()) { mPrimitiveFields.mMatrixOrPivotDirty = true; Loading Loading
api/current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -47548,6 +47548,7 @@ package android.view { method public boolean isOpaque(); method protected boolean isPaddingOffsetRequired(); method public boolean isPaddingRelative(); method public boolean isPivotSet(); method public boolean isPressed(); method public boolean isSaveEnabled(); method public boolean isSaveFromParentEnabled(); Loading Loading @@ -47666,6 +47667,7 @@ package android.view { method public boolean requestRectangleOnScreen(android.graphics.Rect, boolean); method public final void requestUnbufferedDispatch(android.view.MotionEvent); method public final <T extends android.view.View> T requireViewById(int); method public void resetPivot(); method public static int resolveSize(int, int); method public static int resolveSizeAndState(int, int, int); method public boolean restoreDefaultFocus();
core/java/android/view/RenderNode.java +7 −0 Original line number Diff line number Diff line Loading @@ -687,6 +687,11 @@ public class RenderNode { return nIsPivotExplicitlySet(mNativeRenderNode); } /** lint */ public boolean resetPivot() { return nResetPivot(mNativeRenderNode); } /** * Sets the camera distance for the display list. Refer to * {@link View#setCameraDistance(float)} for more information on how to Loading Loading @@ -903,6 +908,8 @@ public class RenderNode { @CriticalNative private static native boolean nSetPivotX(long renderNode, float pivotX); @CriticalNative private static native boolean nResetPivot(long renderNode); @CriticalNative private static native boolean nSetLayerType(long renderNode, int layerType); @CriticalNative private static native boolean nSetLayerPaint(long renderNode, long paint); Loading
core/java/android/view/View.java +22 −0 Original line number Diff line number Diff line Loading @@ -14842,6 +14842,28 @@ public class View implements Drawable.Callback, KeyEvent.Callback, } } /** * Returns whether or not a pivot has been set by a call to {@link #setPivotX(float)} or * {@link #setPivotY(float)}. If no pivot has been set then the pivot will be the center * of the view. * * @return True if a pivot has been set, false if the default pivot is being used */ public boolean isPivotSet() { return mRenderNode.isPivotExplicitlySet(); } /** * Clears any pivot previously set by a call to {@link #setPivotX(float)} or * {@link #setPivotY(float)}. After calling this {@link #isPivotSet()} will be false * and the pivot used for rotation will return to default of being centered on the view. */ public void resetPivot() { if (mRenderNode.resetPivot()) { invalidateViewProperty(false, false); } } /** * The opacity of the view. This is a value from 0 to 1, where 0 means the view is * completely transparent and 1 means the view is completely opaque.
core/jni/android_view_RenderNode.cpp +5 −0 Original line number Diff line number Diff line Loading @@ -266,6 +266,10 @@ static jboolean android_view_RenderNode_setPivotY(jlong renderNodePtr, float py) return SET_AND_DIRTY(setPivotY, py, RenderNode::GENERIC); } static jboolean android_view_RenderNode_resetPivot(jlong renderNodePtr) { return SET_AND_DIRTY(resetPivot, /* void */, RenderNode::GENERIC); } static jboolean android_view_RenderNode_setCameraDistance(jlong renderNodePtr, float distance) { return SET_AND_DIRTY(setCameraDistance, distance, RenderNode::GENERIC); } Loading Loading @@ -613,6 +617,7 @@ static const JNINativeMethod gMethods[] = { { "nSetScaleY", "(JF)Z", (void*) android_view_RenderNode_setScaleY }, { "nSetPivotX", "(JF)Z", (void*) android_view_RenderNode_setPivotX }, { "nSetPivotY", "(JF)Z", (void*) android_view_RenderNode_setPivotY }, { "nResetPivot", "(J)Z", (void*) android_view_RenderNode_resetPivot }, { "nSetCameraDistance", "(JF)Z", (void*) android_view_RenderNode_setCameraDistance }, { "nSetLeft", "(JI)Z", (void*) android_view_RenderNode_setLeft }, { "nSetTop", "(JI)Z", (void*) android_view_RenderNode_setTop }, Loading
libs/hwui/RenderProperties.h +4 −0 Original line number Diff line number Diff line Loading @@ -328,6 +328,10 @@ public: bool isPivotExplicitlySet() const { return mPrimitiveFields.mPivotExplicitlySet; } bool resetPivot() { return RP_SET_AND_DIRTY(mPrimitiveFields.mPivotExplicitlySet, false); } bool setCameraDistance(float distance) { if (distance != getCameraDistance()) { mPrimitiveFields.mMatrixOrPivotDirty = true; Loading