Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f791703f authored by Chris Craik's avatar Chris Craik
Browse files

Avoid changeBounds animations on Views that are not yet laidout

bug:17683930

This means that GONE views with empty bounds don't trigger
ChangeBounds animations the first time they're shown.

Change-Id: I6503c5b0a790d3d31f7566fab27a0b12c5f61f26
parent ba5df0d0
Loading
Loading
Loading
Loading
+10 −7
Original line number Diff line number Diff line
@@ -117,6 +117,8 @@ public class ChangeBounds extends Transition {

    private void captureValues(TransitionValues values) {
        View view = values.view;

        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());
@@ -126,6 +128,7 @@ public class ChangeBounds extends Transition {
                values.values.put(PROPNAME_WINDOW_Y, tempLocation[1]);
            }
        }
    }

    @Override
    public void captureStartValues(TransitionValues transitionValues) {