summaryrefslogtreecommitdiff
path: root/core/java/android/app/ActivityOptions.java
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2012-05-07 15:49:39 -0700
committerDianne Hackborn <hackbod@google.com>2012-05-07 15:54:58 -0700
commitd367ca88eeede24e7d9a51ae85996a9d08d734b2 (patch)
tree11bd866bf13ce77533bd56a05b5fa12ec7797206 /core/java/android/app/ActivityOptions.java
parentff0e8cd8b60aa8372b06edecb2e754b0905c4d31 (diff)
Tweak anim API to automatically call Intent.setSourceBounds().
Also don't retain the source bounds in recent tasks, since it has no meaning there and it would be better when relaunching an activity to have a new bounds set based on wherever it is now being launched from. Change-Id: Ia90c04ee98a888a7f725b038abe23d71e2b12800
Diffstat (limited to 'core/java/android/app/ActivityOptions.java')
-rw-r--r--core/java/android/app/ActivityOptions.java12
1 files changed, 11 insertions, 1 deletions
diff --git a/core/java/android/app/ActivityOptions.java b/core/java/android/app/ActivityOptions.java
index b73058140bd9..3d0b7d8e17a8 100644
--- a/core/java/android/app/ActivityOptions.java
+++ b/core/java/android/app/ActivityOptions.java
@@ -147,12 +147,17 @@ public class ActivityOptions {
* activity is scaled from a small originating area of the screen to
* its final full representation.
*
+ * <p>If the Intent this is being used with has not set its
+ * {@link android.content.Intent#setSourceBounds Intent.setSourceBounds},
+ * those bounds will be filled in for you based on the initial
+ * bounds passed in here.
+ *
* @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 startWidth The initial width of the new activity.
- * @param startWidth The initial height of the new activity.
+ * @param startHeight 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.
*/
@@ -175,6 +180,11 @@ public class ActivityOptions {
* is scaled from a given position to the new activity window that is
* being started.
*
+ * <p>If the Intent this is being used with has not set its
+ * {@link android.content.Intent#setSourceBounds Intent.setSourceBounds},
+ * those bounds will be filled in for you based on the initial
+ * thumbnail location and size provided here.
+ *
* @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