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

Commit a7a56174 authored by Liran Binyamin's avatar Liran Binyamin Committed by Android (Google) Code Review
Browse files

Merge "Fix bubble translation x when bar is collapsed" into main

parents 1a18fb83 0f083774
Loading
Loading
Loading
Loading
+4 −3
Original line number Original line Diff line number Diff line
@@ -979,8 +979,7 @@ public class BubbleBarView extends FrameLayout {
        return translationX - getScaleIconShift();
        return translationX - getScaleIconShift();
    }
    }


    private float getCollapsedBubbleTranslationX(int bubbleIndex, int bubbleCount,
    private float getCollapsedBubbleTranslationX(int bubbleIndex, int bubbleCount, boolean onLeft) {
            boolean onLeft) {
        if (bubbleIndex < 0 || bubbleIndex >= bubbleCount) {
        if (bubbleIndex < 0 || bubbleIndex >= bubbleCount) {
            return 0;
            return 0;
        }
        }
@@ -991,7 +990,9 @@ public class BubbleBarView extends FrameLayout {
                    bubbleIndex == 0 && bubbleCount > MAX_VISIBLE_BUBBLES_COLLAPSED
                    bubbleIndex == 0 && bubbleCount > MAX_VISIBLE_BUBBLES_COLLAPSED
                            ? mIconOverlapAmount : 0);
                            ? mIconOverlapAmount : 0);
        } else {
        } else {
            translationX = mBubbleBarPadding + (bubbleIndex == 0 ? 0 : mIconOverlapAmount);
            translationX = mBubbleBarPadding + (
                    bubbleIndex == 0 || bubbleCount <= MAX_VISIBLE_BUBBLES_COLLAPSED
                            ? 0 : mIconOverlapAmount);
        }
        }
        return translationX - getScaleIconShift();
        return translationX - getScaleIconShift();
    }
    }