App bar state is flipped if the close button is pressed when bottom sheet is expanded
ianyong opened this issue · 1 comments
ianyong commented
When bottom sheet is set to STATE_EXPANDED and the close button is pressed, the bottom sheet is set to STATE_COLLAPSED but app bar state is not updated. This results in the app bar text showing above the viewpager image when bottom sheet is set to STATE_ANCHOR_POINT and not showing when bottom sheet is set to STATE_EXPANDED again.
ianyong commented
Updated the close button behaviour such that the bottom sheet never goes from STATE_EXPANDED to STATE_COLLAPSED immediately. Pressing the close button when the bottom sheet is set to STATE_EXPANDED now sets the bottom sheet to STATE_ANCHOR_POINT. Similarly, when the bottom sheet is set to STATE_ANCHOR_POINT, pressing the close button will set it to STATE_COLLAPSED.