[BottomSheetDialog] Broken after last commit for edge to edge
See original GitHub issueDescription: Edge to edge is broken with last commit
I’ve checked drawEdgeToEdge is properly set to true and WindowCompat.setDecorFitsSystemWindows(window, !drawEdgeToEdge)
is properly called with false but this triggers the state shown above. The call should have made the window edgetoedge and the statusbar should have been taken in account via padding in the rest of the code.
Reverting that commit fix the issue
Expected behavior: The container should be edge to edge it is not.
Source code: Bug introduced by https://github.com/material-components/material-components-android/commit/2d3024ea1092b55d46e7785527853186e124d5aa
Minimal sample app repro:
Android API version: Android 12L + Androidx core 1.8.0
Material Library version: Snapshot
Device: P6 Pro last patches
Ping @drchen
To help us triage faster, please check to make sure you are using the latest version of the library.
We also happily accept pull requests.
Issue Analytics
- State:
- Created a year ago
- Comments:17 (9 by maintainers)
Top GitHub Comments
Welcome to the joys of edge to edge 😃 Even more fun when dealing with samsung.
Anyway sorry for the delay, different time zone.
Nothing special as I’m starting fresh on the new M3 themes
parent="Theme.Material3.Light.NoActionBar"
andI’ll try to find some times next week to repro both things
I agree the whole theming structure of bottom sheet dialogs is kind of confusing. (And I agree we may need to improve our dev doc description.) And yes,
paddingBottomSystemWindowInsets
needs to be set inside your?attr/bottomSheetStyle
instead of the app theme. (It probably also works if you set it in?attr/bottomSheetDialogTheme
but I’m not 100% sure.Regarding the edge-to-edge mode, I confirmed that it’s documented that bottom sheet dialog will only make it edge-to-edge when
enableEdgeToEdge=true
and the navigation bar is translucent: https://github.com/material-components/material-components-android/blob/master/docs/components/BottomSheet.md#handling-insets-and-fullscreenIn other words, clients need to “trigger” edge-to-edge mode by setting navigation bar color to a translucent color. It can be a bit confusing but I think it’s more or less a standard practice.
I’m going to close the issue for now. Let me know if you have more questions. : )