From 4e907a7fdfceb3f8ee455cd92c6947e69af22adc Mon Sep 17 00:00:00 2001 From: Michael Mikhail Date: Fri, 21 Oct 2022 15:31:09 +0000 Subject: [PATCH] Update chipbar text view in new events Requests layout to update the bounds of TextView. Bug: 253228632. Test: Checked that the chipbar is getting resized in new events. Change-Id: Ib1f1dabfdaecc6362b3b8434f49f5e4cb4aae9ce --- .../systemui/temporarydisplay/chipbar/ChipbarCoordinator.kt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/SystemUI/src/com/android/systemui/temporarydisplay/chipbar/ChipbarCoordinator.kt b/packages/SystemUI/src/com/android/systemui/temporarydisplay/chipbar/ChipbarCoordinator.kt index 45ce687a1a4d4..ecdb9cf64a27c 100644 --- a/packages/SystemUI/src/com/android/systemui/temporarydisplay/chipbar/ChipbarCoordinator.kt +++ b/packages/SystemUI/src/com/android/systemui/temporarydisplay/chipbar/ChipbarCoordinator.kt @@ -122,6 +122,9 @@ open class ChipbarCoordinator @Inject constructor( // ---- Text ---- val textView = currentView.requireViewById(R.id.text) TextViewBinder.bind(textView, newInfo.text) + // Updates text view bounds to make sure it perfectly fits the new text + // (If the new text is smaller than the previous text) see b/253228632. + textView.requestLayout() // ---- End item ---- // Loading