Merge "Shift transient taskbar to ensure 12dp distance with the bubble bar." into main

This commit is contained in:
Mykola Podolian authored and Android (Google) Code Review committed 2025-01-13 12:52:21 -08:00
commit fc8db9afc3
9 files changed
+193 -47

No files matched your search

@@ -1339,6 +1339,14 @@ public class BubbleBarView extends FrameLayout {
return getScaledIconSize() + mIconOverlapAmount + 2 * mBubbleBarPadding;
}
float getCollapsedWidthForIconSizeAndPadding(int iconSize, int bubbleBarPadding) {
final int bubbleChildCount = Math.min(getBubbleChildCount(), MAX_VISIBLE_BUBBLES_COLLAPSED);
if (bubbleChildCount == 0) return 0;
final int spacesCount = bubbleChildCount - 1;
final float horizontalPadding = 2 * bubbleBarPadding;
return iconSize * bubbleChildCount + mIconOverlapAmount * spacesCount + horizontalPadding;
}
/** Returns the child count excluding the overflow if it's present. */
int getBubbleChildCount() {
return hasOverflow() ? getChildCount() - 1 : getChildCount();