summaryrefslogtreecommitdiffstats
path: root/core/java/android
diff options
context:
space:
mode:
authorChris Craik <ccraik@google.com>2014-10-06 22:06:22 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-10-06 22:06:23 +0000
commit6c9f0a01602697aaed99f54c4db0d6296701ed43 (patch)
treea3bc9a134a8da1e089c5518990a68f7407fa70a3 /core/java/android
parent56b7d562af4dd0e7bd04163fe9a86a801fcff1fe (diff)
parentf791703f9bc566bee4f4809910d09dd415342078 (diff)
downloadframeworks_base-6c9f0a01602697aaed99f54c4db0d6296701ed43.zip
frameworks_base-6c9f0a01602697aaed99f54c4db0d6296701ed43.tar.gz
frameworks_base-6c9f0a01602697aaed99f54c4db0d6296701ed43.tar.bz2
Merge "Avoid changeBounds animations on Views that are not yet laidout" into lmp-dev
Diffstat (limited to 'core/java/android')
-rw-r--r--core/java/android/transition/ChangeBounds.java17
1 files changed, 10 insertions, 7 deletions
diff --git a/core/java/android/transition/ChangeBounds.java b/core/java/android/transition/ChangeBounds.java
index eb17429..0a44ba2 100644
--- a/core/java/android/transition/ChangeBounds.java
+++ b/core/java/android/transition/ChangeBounds.java
@@ -117,13 +117,16 @@ public class ChangeBounds extends Transition {
private void captureValues(TransitionValues values) {
View view = values.view;
- values.values.put(PROPNAME_BOUNDS, new Rect(view.getLeft(), view.getTop(),
- view.getRight(), view.getBottom()));
- values.values.put(PROPNAME_PARENT, values.view.getParent());
- if (mReparent) {
- values.view.getLocationInWindow(tempLocation);
- values.values.put(PROPNAME_WINDOW_X, tempLocation[0]);
- values.values.put(PROPNAME_WINDOW_Y, tempLocation[1]);
+
+ if (view.isLaidOut()) {
+ values.values.put(PROPNAME_BOUNDS, new Rect(view.getLeft(), view.getTop(),
+ view.getRight(), view.getBottom()));
+ values.values.put(PROPNAME_PARENT, values.view.getParent());
+ if (mReparent) {
+ values.view.getLocationInWindow(tempLocation);
+ values.values.put(PROPNAME_WINDOW_X, tempLocation[0]);
+ values.values.put(PROPNAME_WINDOW_Y, tempLocation[1]);
+ }
}
}