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

Commit 6e81962b authored by Lyn Han's avatar Lyn Han
Browse files

Scale up dot and position it closer to icon

This is a band-aid solution to UI jank that looks good enough until we
can get actual icon path and dot location from launcher.

Bug: 129158983
Test: manual (Flyout-to-dot animation looks better on left & right edge)
Change-Id: If9667e42780d9e39acf6f74cdbe0cb805f4e3d47
parent e0b6d180
Loading
Loading
Loading
Loading
+4 −6
Original line number Diff line number Diff line
@@ -138,7 +138,7 @@ public class BubbleFlyoutView extends FrameLayout {
    /** Extra scale down of the dot provides room for error in estimating actual dot location.
     * At the end of the flyout-to-dot animation, wherever the small dot ends up, its disappearance
     * and the appearance of the larger real dot forms a cohesive animation.*/
    private static final float DOT_SCALE = 0.6f;
    private static final float DOT_SCALE = 0.8f;

    /** Callback to run when the flyout is hidden. */
    private Runnable mOnHide;
@@ -262,15 +262,13 @@ public class BubbleFlyoutView extends FrameLayout {
            final float distanceFromFlyoutLeftToDotCenterX =
                    mFlyoutSpaceFromBubble + mBubbleIconTopPadding + mOriginalDotSize / 2;
            if (mArrowPointingLeft) {
                mTranslationXWhenDot = -distanceFromFlyoutLeftToDotCenterX - mNewDotRadius;
                mTranslationXWhenDot = -distanceFromFlyoutLeftToDotCenterX - (mOriginalDotSize / 2);
            } else {
                mTranslationXWhenDot =
                        getWidth() + distanceFromFlyoutLeftToDotCenterX - mNewDotRadius;
                        getWidth() + distanceFromFlyoutLeftToDotCenterX - (mOriginalDotSize / 2);
            }

            mTranslationYWhenDot =
                    getHeight() / 2f
                            - mNewDotRadius
                            - mBubbleSize / 2f
                            + mOriginalDotSize / 2;
        });