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
This commit is contained in:
Michael Mikhail
2022-10-21 15:31:09 +00:00
parent 63322e05fb
commit 4e907a7fdf

View File

@@ -122,6 +122,9 @@ open class ChipbarCoordinator @Inject constructor(
// ---- Text ----
val textView = currentView.requireViewById<TextView>(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