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

Commit 50b2c244 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Return proper values from ChangeScroll.getTransitionProperties"

parents 044d547b ae61b85c
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -34,6 +34,11 @@ public class ChangeScroll extends Transition {
    private static final String PROPNAME_SCROLL_X = "android:changeScroll:x";
    private static final String PROPNAME_SCROLL_Y = "android:changeScroll:y";

    private static final String[] PROPERTIES = {
            PROPNAME_SCROLL_X,
            PROPNAME_SCROLL_Y,
    };

    public ChangeScroll() {}

    public ChangeScroll(Context context, AttributeSet attrs) {
@@ -50,6 +55,11 @@ public class ChangeScroll extends Transition {
        captureValues(transitionValues);
    }

    @Override
    public String[] getTransitionProperties() {
        return PROPERTIES;
    }

    private void captureValues(TransitionValues transitionValues) {
        transitionValues.values.put(PROPNAME_SCROLL_X, transitionValues.view.getScrollX());
        transitionValues.values.put(PROPNAME_SCROLL_Y, transitionValues.view.getScrollY());