Change theme
Help
Press space for more information.
Show links for this issue (Shortcut: i, l)
Copy issue ID
Previous Issue (Shortcut: k)
Next Issue (Shortcut: j)
Sign in to use full features.
Vote: I am impacted
Notification menu
Refresh (Shortcut: Shift+r)
Go home (Shortcut: u)
Pending code changes (auto-populated)
View issue level access limits(Press Alt + Right arrow for more information)
Unintended behavior
View staffing
Description
Jetpack Compose component used: ModalBottomSheet
Android Studio Build: Ladybug 2024.2.1
Kotlin version: 2.0.21
Steps to Reproduce or Code Sample to Reproduce:
1. Setup an activity with hidden status bar:
val window = (view.context as Activity).window
// remove top status bar
WindowInsetsControllerCompat(window, view).apply {
hide(WindowInsetsCompat.Type.statusBars())
systemBarsBehavior = WindowInsetsControllerCompat.BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE
}
2. Create a ModalBottomSheet with a button to control it's visibility
3. click on the button
You will see that while the sheet is visible, so is the statusbar for no reason. When hiding the sheet, the statusbar hides back, causing a visible UI glitch at the bottom.
* Also, using bottomSheetState.show() or hide() is redundant as we conditionally compose the ModalBottomSheet.
Stack trace (if applicable):