Loading api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -3696,6 +3696,7 @@ package android.app { } public class ActivityOptions { method public static android.app.ActivityOptions makeClipRevealAnimation(android.view.View, int, int, int, int); method public static android.app.ActivityOptions makeCustomAnimation(android.content.Context, int, int); method public static android.app.ActivityOptions makeScaleUpAnimation(android.view.View, int, int, int, int); method public static android.app.ActivityOptions makeSceneTransitionAnimation(android.app.Activity, android.view.View, java.lang.String); api/system-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -3784,6 +3784,7 @@ package android.app { } public class ActivityOptions { method public static android.app.ActivityOptions makeClipRevealAnimation(android.view.View, int, int, int, int); method public static android.app.ActivityOptions makeCustomAnimation(android.content.Context, int, int); method public static android.app.ActivityOptions makeScaleUpAnimation(android.view.View, int, int, int, int); method public static android.app.ActivityOptions makeSceneTransitionAnimation(android.app.Activity, android.view.View, java.lang.String); core/java/android/app/ActivityOptions.java +31 −0 Original line number Diff line number Diff line Loading @@ -140,6 +140,8 @@ public class ActivityOptions { public static final int ANIM_THUMBNAIL_ASPECT_SCALE_DOWN = 9; /** @hide */ public static final int ANIM_CUSTOM_IN_PLACE = 10; /** @hide */ public static final int ANIM_CLIP_REVEAL = 11; private String mPackageName; private int mAnimationType = ANIM_NONE; Loading Loading @@ -290,6 +292,33 @@ public class ActivityOptions { return opts; } /** * Create an ActivityOptions specifying an animation where the new * activity is revealed from a small originating area of the screen to * its final full representation. * * @param source The View that the new activity is animating from. This * defines the coordinate space for <var>startX</var> and <var>startY</var>. * @param startX The x starting location of the new activity, relative to <var>source</var>. * @param startY The y starting location of the activity, relative to <var>source</var>. * @param width The initial width of the new activity. * @param height The initial height of the new activity. * @return Returns a new ActivityOptions object that you can use to * supply these options as the options Bundle when starting an activity. */ public static ActivityOptions makeClipRevealAnimation(View source, int startX, int startY, int width, int height) { ActivityOptions opts = new ActivityOptions(); opts.mAnimationType = ANIM_CLIP_REVEAL; int[] pts = new int[2]; source.getLocationOnScreen(pts); opts.mStartX = pts[0] + startX; opts.mStartY = pts[1] + startY; opts.mWidth = width; opts.mHeight = height; return opts; } /** * Create an ActivityOptions specifying an animation where a thumbnail * is scaled from a given position to the new activity window that is Loading Loading @@ -582,6 +611,7 @@ public class ActivityOptions { break; case ANIM_SCALE_UP: case ANIM_CLIP_REVEAL: mStartX = opts.getInt(KEY_ANIM_START_X, 0); mStartY = opts.getInt(KEY_ANIM_START_Y, 0); mWidth = opts.getInt(KEY_ANIM_WIDTH, 0); Loading Loading @@ -809,6 +839,7 @@ public class ActivityOptions { b.putInt(KEY_ANIM_IN_PLACE_RES_ID, mCustomInPlaceResId); break; case ANIM_SCALE_UP: case ANIM_CLIP_REVEAL: b.putInt(KEY_ANIM_START_X, mStartX); b.putInt(KEY_ANIM_START_Y, mStartY); b.putInt(KEY_ANIM_WIDTH, mWidth); Loading core/java/android/view/IWindowManager.aidl +2 −0 Original line number Diff line number Diff line Loading @@ -91,6 +91,8 @@ interface IWindowManager IRemoteCallback startedCallback); void overridePendingAppTransitionScaleUp(int startX, int startY, int startWidth, int startHeight); void overridePendingAppTransitionClipReveal(int startX, int startY, int startWidth, int startHeight); void overridePendingAppTransitionThumb(in Bitmap srcThumb, int startX, int startY, IRemoteCallback startedCallback, boolean scaleUp); void overridePendingAppTransitionAspectScaledThumb(in Bitmap srcThumb, int startX, Loading core/java/android/view/animation/ClipRectAnimation.java +11 −2 Original line number Diff line number Diff line Loading @@ -26,8 +26,8 @@ import android.graphics.Rect; * @hide */ public class ClipRectAnimation extends Animation { private Rect mFromRect = new Rect(); private Rect mToRect = new Rect(); protected Rect mFromRect = new Rect(); protected Rect mToRect = new Rect(); /** * Constructor to use when building a ClipRectAnimation from code Loading @@ -43,6 +43,15 @@ public class ClipRectAnimation extends Animation { mToRect.set(toClip); } /** * Constructor to use when building a ClipRectAnimation from code */ public ClipRectAnimation(int fromL, int fromT, int fromR, int fromB, int toL, int toT, int toR, int toB) { mFromRect.set(fromL, fromT, fromR, fromB); mToRect.set(toL, toT, toR, toB); } @Override protected void applyTransformation(float it, Transformation tr) { int l = mFromRect.left + (int) ((mToRect.left - mFromRect.left) * it); Loading Loading
api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -3696,6 +3696,7 @@ package android.app { } public class ActivityOptions { method public static android.app.ActivityOptions makeClipRevealAnimation(android.view.View, int, int, int, int); method public static android.app.ActivityOptions makeCustomAnimation(android.content.Context, int, int); method public static android.app.ActivityOptions makeScaleUpAnimation(android.view.View, int, int, int, int); method public static android.app.ActivityOptions makeSceneTransitionAnimation(android.app.Activity, android.view.View, java.lang.String);
api/system-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -3784,6 +3784,7 @@ package android.app { } public class ActivityOptions { method public static android.app.ActivityOptions makeClipRevealAnimation(android.view.View, int, int, int, int); method public static android.app.ActivityOptions makeCustomAnimation(android.content.Context, int, int); method public static android.app.ActivityOptions makeScaleUpAnimation(android.view.View, int, int, int, int); method public static android.app.ActivityOptions makeSceneTransitionAnimation(android.app.Activity, android.view.View, java.lang.String);
core/java/android/app/ActivityOptions.java +31 −0 Original line number Diff line number Diff line Loading @@ -140,6 +140,8 @@ public class ActivityOptions { public static final int ANIM_THUMBNAIL_ASPECT_SCALE_DOWN = 9; /** @hide */ public static final int ANIM_CUSTOM_IN_PLACE = 10; /** @hide */ public static final int ANIM_CLIP_REVEAL = 11; private String mPackageName; private int mAnimationType = ANIM_NONE; Loading Loading @@ -290,6 +292,33 @@ public class ActivityOptions { return opts; } /** * Create an ActivityOptions specifying an animation where the new * activity is revealed from a small originating area of the screen to * its final full representation. * * @param source The View that the new activity is animating from. This * defines the coordinate space for <var>startX</var> and <var>startY</var>. * @param startX The x starting location of the new activity, relative to <var>source</var>. * @param startY The y starting location of the activity, relative to <var>source</var>. * @param width The initial width of the new activity. * @param height The initial height of the new activity. * @return Returns a new ActivityOptions object that you can use to * supply these options as the options Bundle when starting an activity. */ public static ActivityOptions makeClipRevealAnimation(View source, int startX, int startY, int width, int height) { ActivityOptions opts = new ActivityOptions(); opts.mAnimationType = ANIM_CLIP_REVEAL; int[] pts = new int[2]; source.getLocationOnScreen(pts); opts.mStartX = pts[0] + startX; opts.mStartY = pts[1] + startY; opts.mWidth = width; opts.mHeight = height; return opts; } /** * Create an ActivityOptions specifying an animation where a thumbnail * is scaled from a given position to the new activity window that is Loading Loading @@ -582,6 +611,7 @@ public class ActivityOptions { break; case ANIM_SCALE_UP: case ANIM_CLIP_REVEAL: mStartX = opts.getInt(KEY_ANIM_START_X, 0); mStartY = opts.getInt(KEY_ANIM_START_Y, 0); mWidth = opts.getInt(KEY_ANIM_WIDTH, 0); Loading Loading @@ -809,6 +839,7 @@ public class ActivityOptions { b.putInt(KEY_ANIM_IN_PLACE_RES_ID, mCustomInPlaceResId); break; case ANIM_SCALE_UP: case ANIM_CLIP_REVEAL: b.putInt(KEY_ANIM_START_X, mStartX); b.putInt(KEY_ANIM_START_Y, mStartY); b.putInt(KEY_ANIM_WIDTH, mWidth); Loading
core/java/android/view/IWindowManager.aidl +2 −0 Original line number Diff line number Diff line Loading @@ -91,6 +91,8 @@ interface IWindowManager IRemoteCallback startedCallback); void overridePendingAppTransitionScaleUp(int startX, int startY, int startWidth, int startHeight); void overridePendingAppTransitionClipReveal(int startX, int startY, int startWidth, int startHeight); void overridePendingAppTransitionThumb(in Bitmap srcThumb, int startX, int startY, IRemoteCallback startedCallback, boolean scaleUp); void overridePendingAppTransitionAspectScaledThumb(in Bitmap srcThumb, int startX, Loading
core/java/android/view/animation/ClipRectAnimation.java +11 −2 Original line number Diff line number Diff line Loading @@ -26,8 +26,8 @@ import android.graphics.Rect; * @hide */ public class ClipRectAnimation extends Animation { private Rect mFromRect = new Rect(); private Rect mToRect = new Rect(); protected Rect mFromRect = new Rect(); protected Rect mToRect = new Rect(); /** * Constructor to use when building a ClipRectAnimation from code Loading @@ -43,6 +43,15 @@ public class ClipRectAnimation extends Animation { mToRect.set(toClip); } /** * Constructor to use when building a ClipRectAnimation from code */ public ClipRectAnimation(int fromL, int fromT, int fromR, int fromB, int toL, int toT, int toR, int toB) { mFromRect.set(fromL, fromT, fromR, fromB); mToRect.set(toL, toT, toR, toB); } @Override protected void applyTransformation(float it, Transformation tr) { int l = mFromRect.left + (int) ((mToRect.left - mFromRect.left) * it); Loading