summaryrefslogtreecommitdiff
path: root/core/java/android/app/ActivityOptions.java
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2012-04-10 15:54:19 -0700
committerDianne Hackborn <hackbod@google.com>2012-04-10 15:54:19 -0700
commit9944ecd28e1c56c4e9f0a50ed6e8be2110ba5c31 (patch)
tree2a66574915f1dc6dc2302400649cc183502e63a0 /core/java/android/app/ActivityOptions.java
parent2a854c13f864d5493846a7fc66bb6aefeaac8c8b (diff)
Hide the callback for activity animation options.
Not something I want to be stuck reporting forever. Change-Id: Iab13fb7abb23d466492230242bfbae29f1fd01f3
Diffstat (limited to 'core/java/android/app/ActivityOptions.java')
-rw-r--r--core/java/android/app/ActivityOptions.java22
1 files changed, 21 insertions, 1 deletions
diff --git a/core/java/android/app/ActivityOptions.java b/core/java/android/app/ActivityOptions.java
index c637df0ba07d..c3cceafe8d7f 100644
--- a/core/java/android/app/ActivityOptions.java
+++ b/core/java/android/app/ActivityOptions.java
@@ -21,7 +21,6 @@ import android.graphics.Bitmap;
import android.os.Bundle;
import android.os.Handler;
import android.os.IRemoteCallback;
-import android.os.Message;
import android.os.RemoteException;
import android.view.View;
@@ -121,6 +120,7 @@ public class ActivityOptions {
/**
* Callback for use with {@link ActivityOptions#makeThumbnailScaleUpAnimation}
* to find out when the given animation has started running.
+ * @hide
*/
public interface OnAnimationStartedListener {
void onAnimationStarted();
@@ -137,11 +137,31 @@ public class ActivityOptions {
* of the animation.
* @param startX The x starting location of the bitmap, in screen coordiantes.
* @param startY The y starting location of the bitmap, in screen coordinates.
+ * @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 makeThumbnailScaleUpAnimation(View source,
+ Bitmap thumbnail, int startX, int startY) {
+ return makeThumbnailScaleUpAnimation(source, thumbnail, startX, startY, null);
+ }
+
+ /**
+ * Create an ActivityOptions specifying an animation where a thumbnail
+ * is scaled from a given position to the new activity window that is
+ * being started.
+ *
+ * @param source The View that this thumbnail is animating from. This
+ * defines the coordinate space for <var>startX</var> and <var>startY</var>.
+ * @param thumbnail The bitmap that will be shown as the initial thumbnail
+ * of the animation.
+ * @param startX The x starting location of the bitmap, in screen coordiantes.
+ * @param startY The y starting location of the bitmap, in screen coordinates.
* @param listener Optional OnAnimationStartedListener to find out when the
* requested animation has started running. If for some reason the animation
* is not executed, the callback will happen immediately.
* @return Returns a new ActivityOptions object that you can use to
* supply these options as the options Bundle when starting an activity.
+ * @hide
*/
public static ActivityOptions makeThumbnailScaleUpAnimation(View source,
Bitmap thumbnail, int startX, int startY, OnAnimationStartedListener listener) {