am 1a6c41fb: am 6c9f0a01: Merge "Avoid changeBounds animations on Views that are not yet laidout" into lmp-dev
* commit '1a6c41fbad9c1c6725d189fdcf7dae2fe3f00b4d': Avoid changeBounds animations on Views that are not yet laidout
This commit is contained in:
@@ -117,13 +117,16 @@ public class ChangeBounds extends Transition {
|
|||||||
|
|
||||||
private void captureValues(TransitionValues values) {
|
private void captureValues(TransitionValues values) {
|
||||||
View view = values.view;
|
View view = values.view;
|
||||||
values.values.put(PROPNAME_BOUNDS, new Rect(view.getLeft(), view.getTop(),
|
|
||||||
view.getRight(), view.getBottom()));
|
if (view.isLaidOut()) {
|
||||||
values.values.put(PROPNAME_PARENT, values.view.getParent());
|
values.values.put(PROPNAME_BOUNDS, new Rect(view.getLeft(), view.getTop(),
|
||||||
if (mReparent) {
|
view.getRight(), view.getBottom()));
|
||||||
values.view.getLocationInWindow(tempLocation);
|
values.values.put(PROPNAME_PARENT, values.view.getParent());
|
||||||
values.values.put(PROPNAME_WINDOW_X, tempLocation[0]);
|
if (mReparent) {
|
||||||
values.values.put(PROPNAME_WINDOW_Y, tempLocation[1]);
|
values.view.getLocationInWindow(tempLocation);
|
||||||
|
values.values.put(PROPNAME_WINDOW_X, tempLocation[0]);
|
||||||
|
values.values.put(PROPNAME_WINDOW_Y, tempLocation[1]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user