-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Description
Description: I am currently trying to create a fullscreen/full height BottomSheetDialogFragment, but since it has a very weird behavior implemented where it adds and retracts insets while the sheet is sliding in and out, I decided to disable any inset handling done by the component and manually take care of the insets. However, I found a problem with that approach as well. No matter what I try, the component still forces a top inset that is the same size of the status bar even when disabling any and all inset handling flags I could find checked in the component source code, ex.:
Lines 1726 to 1734 in 46778db
| if (!paddingBottomSystemWindowInsets | |
| && !paddingLeftSystemWindowInsets | |
| && !paddingRightSystemWindowInsets | |
| && !marginLeftSystemWindowInsets | |
| && !marginRightSystemWindowInsets | |
| && !marginTopSystemWindowInsets | |
| && !shouldHandleGestureInsets) { | |
| return; | |
| } |
The objective is for the component screen to fill the entire screen of the device, but as it currently is the top area of the status bar can never be covered, meaning the component will never display underneath the status bar as desired.
Expected behavior: Screenshots are attached,
-
Screen 2 is what is currently happening, notice the top area that cannot be covered

-
Screen 3 is what it should be looking like at the top (I created a separat activity just to represent how screen 2 should be looking)

Source code: Not applicable.
Minimal sample app repro: Sample follows attached.
BottomSheetInsetBug.zip
Android API version: Any android version since 24 (7.0 Nougat) till most recent 33 (13.0). Tested all versions and every single one of them have the same issue.
Material Library version: Material Android Library version com.google.android.material:material:1.8.0
Device: Any real device and emulator tested.
