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

Commit 1898d16e authored by Fengjiang Li's avatar Fengjiang Li
Browse files

[Predictive Back] Fix small bottom gap in widget to home animation

The bug was caused by a math problem. The extrat bottom offset should be

 offset = (H / 0.9 - H) / 2

Fix: b/269393854
Test: manual
Change-Id: Ia4d6b3f2ecb53b82d6779cd385ce4d7ca3c16113
parent bd98aef4
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -236,8 +236,8 @@ public abstract class AbstractSlideInView<T extends Context & ActivityContext>
    /** Return extra space revealed during predictive back animation. */
    @Px
    protected int getBottomOffsetPx() {
        return (int) (getMeasuredHeight()
                * (1 - PREDICTIVE_BACK_MIN_SCALE) / 2);
        final int height = getMeasuredHeight();
        return (int) ((height / PREDICTIVE_BACK_MIN_SCALE - height) / 2);
    }

    /**