Merge "Don't remove the overflow from the bubble bar" into udc-qpr-dev am: a81e601afc

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/23727848

Change-Id: I6dc24cd7417390bfe2e6d4f7b6c89d6344b95ec0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Treehugger Robot
2023-06-20 17:08:53 +00:00
committed by Automerger Merge Worker
2 changed files with 4 additions and 2 deletions
@@ -34,4 +34,4 @@ data class BubbleBarBubble(
) : BubbleBarItem(info.key, view)
/** Represents the overflow bubble in the bubble bar. */
data class BubbleBarOverflow(override val view: BubbleView) : BubbleBarItem("overflow", view)
data class BubbleBarOverflow(override val view: BubbleView) : BubbleBarItem("Overflow", view)
@@ -150,7 +150,9 @@ public class BubbleBarView extends FrameLayout {
@Override
public void addView(View child, int index, ViewGroup.LayoutParams params) {
if (getChildCount() + 1 > MAX_BUBBLES) {
removeViewInLayout(getChildAt(getChildCount() - 1));
// the last child view is the overflow bubble and we shouldn't remove that. remove the
// second to last child view.
removeViewInLayout(getChildAt(getChildCount() - 2));
}
super.addView(child, index, params);
}