mirror of
https://github.com/material-components/material-components-android.git
synced 2026-02-20 08:39:55 +08:00
Before this change, the modal sheet is initially expanded with a "%f" for the slide offset text and the state TextView doesn't change until the first drag of the sheet. There was actually no underlying side sheet bug here; the modal sheet has two ways of animating, window animations and the "native" SideSheetBehavior ViewDragHelper animations. In the catalog, the modal sheet's text views weren't getting set yet because it was using the window animations to enter/exit and the callback doesn't run until it's dragged with SideSheetBehavior's ViewDragHelper. The only change necessary here is to set the TextViews to Visibility#GONE until the callback runs, so that there are no uninitialized TextViews visible on screen. Resolves https://github.com/material-components/material-components-android/issues/3167. PiperOrigin-RevId: 529220073