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

Commit e31ecf61 authored by Adam Cohen's avatar Adam Cohen Committed by Android (Google) Code Review
Browse files

Merge "Fixing static StackView scenario (Issue: 3399844)" into honeycomb

parents 17945d0e c6a4716e
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -546,12 +546,16 @@ public class StackView extends AdapterViewAnimator {

    private void onLayout() {
        if (!mFirstLayoutHappened) {
            mSlideAmount = Math.round(SLIDE_UP_RATIO * getMeasuredHeight());
            mSwipeThreshold = Math.round(SWIPE_THRESHOLD_RATIO * mSlideAmount);
            mFirstLayoutHappened = true;
            updateChildTransforms();
        }

        final int newSlideAmount = Math.round(SLIDE_UP_RATIO * getMeasuredHeight());
        if (mSlideAmount != newSlideAmount) {
            mSlideAmount = newSlideAmount;
            mSwipeThreshold = Math.round(SWIPE_THRESHOLD_RATIO * newSlideAmount);
        }

        if (Float.compare(mPerspectiveShiftY, mNewPerspectiveShiftY) != 0 ||
                Float.compare(mPerspectiveShiftX, mNewPerspectiveShiftX) != 0) {