diff options
| author | 2014-10-06 22:35:19 +0000 | |
|---|---|---|
| committer | 2014-10-06 22:35:19 +0000 | |
| commit | 1a6c41fbad9c1c6725d189fdcf7dae2fe3f00b4d (patch) | |
| tree | fad6903115a3571d332d4ba1cbdec3fb8f77f378 | |
| parent | 3df6b76c5f6ca38f986305c805c9d90e0b861a41 (diff) | |
| parent | 6c9f0a01602697aaed99f54c4db0d6296701ed43 (diff) | |
am 6c9f0a01: Merge "Avoid changeBounds animations on Views that are not yet laidout" into lmp-dev
* commit '6c9f0a01602697aaed99f54c4db0d6296701ed43':
Avoid changeBounds animations on Views that are not yet laidout
| -rw-r--r-- | core/java/android/transition/ChangeBounds.java | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/core/java/android/transition/ChangeBounds.java b/core/java/android/transition/ChangeBounds.java index eb17429965ca..0a44ba20f44e 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]); + } } } |