Status Update
Comments
se...@google.com <se...@google.com> #2
ri...@google.com <ri...@google.com> #3
The latter - material3 -
se...@google.com <se...@google.com> #4
I have a pending change available which can expose windowInsets, particularly, insets for bottom and horizontal padding. However top insets are quite tricky as bottom sheet only interacts with top navigation in certain scenarios. I am considering custom animation as an implementation detail that can move sheet content in and out of the way as it (if it) interacts with the top of the screen. Would this resolve this feature request? See
co...@google.com <co...@google.com>
ri...@google.com <ri...@google.com> #5
Thanks José - I've reviewed the CL, the adding of WindowInsets
solves my issue - I left a comment on adding the edgeToEdgeEnabled
parameter, I don't think that should be added.
I'm not sure I follow the top of the screen issue, what would happen if I set a custom amount for the top of the screen? Would you be able to add a video recording of how that works? Thank you.
co...@google.com <co...@google.com>
se...@google.com <se...@google.com>
ap...@google.com <ap...@google.com> #6
Branch: androidx-main
commit 46eea23c96f45f0ee1e57d8aef2f1375507b0dec
Author: José Figueroa Santos <serniebanders@google.com>
Date: Tue Apr 11 14:38:58 2023
[M3][ModalBottomSheet] Enable edge to edge functionality for ModalBottomSheet
Bug: 274872542
Bug: 272973615
Bug: 272334475
Bug: 268432129
Bug: 275849044
Bug: 275486106
Bug: 268433162
RelNote: Add window insets parameter to ModalBottomSheet.
RelNote: Scrim for ModalBottomSheet may now be drawn behind status bar with windowInsets set to zero
RelNote: Updated default ModalBottomSheet functionality to stay outside of system bars including navigation
RelNote: Status bar inset handling is provided by drag handle in edge-to-edge mode.
RelNote: BottomSheetDefaults includes window insets for BottomSheetWindow.
Test: Parameterizes existing tests to work with and without edgeToEdge enabled.
Test: Manual EdgeToEdge testing on various devices and android APIs
Change-Id: I312008e48573ebd21326f77216be0bcd0372aa78
M compose/material3/material3/api/public_plus_experimental_current.txt
M compose/material3/material3/samples/src/main/java/androidx/compose/material3/samples/BottomSheetSamples.kt
M compose/material3/material3/src/androidAndroidTest/kotlin/androidx/compose/material3/ModalBottomSheetTest.kt
M compose/material3/material3/src/androidMain/kotlin/androidx/compose/material3/ModalBottomSheet.android.kt
M compose/material3/material3/src/androidMain/kotlin/androidx/compose/material3/Strings.android.kt
M compose/material3/material3/src/commonMain/kotlin/androidx/compose/material3/SheetDefaults.kt
se...@google.com <se...@google.com>
ju...@google.com <ju...@google.com> #7
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.compose.material3:material3:1.2.0-alpha02
androidx.compose.material3:material3-android:1.2.0-alpha02
pr...@google.com <pr...@google.com> #8
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.compose.material3:material3:1.1.1
di...@zillowgroup.com <di...@zillowgroup.com> #9
When I try to replace the default windowInsets value with something like WindowInsets.navigationBars, it doesn't help because the values are zero at the time of calling ModalBottomSheet(). Placing a hard-coded bottom padding value in the windowInsets object does have an effect when the bottom sheet is expanded, but I can't figure out how to determine the correct padding value since the WindowInsets.navigationBars values are zero.
Specifically, I am experiencing the issue when using Compose BOM 2023.06.01, but not with 2023.05.01.
ar...@gmail.com <ar...@gmail.com> #10
On affected systems the ModalBottomSheet is always aligned to the bottom of the screen.
We see this on Android <= 10 (you can easily see this on an Android 10 emulator, while the Android 13 emulator works).
However, some users report this for Android 13 (only three reports, yet).
I guess it doesn't bother many Android 13 users (most of our users have it), because I think the default is gesture navigation, and while you can see that it overlaps, it doesn't hurt much.
At least with 3-button navigation, you have a hard time to touch the application buttons behind the navigation buttons.
id...@trivago.com <id...@trivago.com> #11
hu...@gmail.com <hu...@gmail.com> #12
Facing the same issue. ModalBottomSheet does not allow the sheet content to be padded rather it places the sheet dialog on top of navigation bars. This way if the sheet container has a background color there's an obvious white line equal to navigation bar inset. Supplying WindowInsets(0,0,0,0) to cancel out bottom paddings & trying to pad content manually doesn't work since within the content navigation insets are returned 0.
ex...@isn.com <ex...@isn.com> #13
I’m experiencing the same issue with ModalBottomSheet
when using material3
B.O.M 2023.06.01
(v1.1.1). This problem does not occur with B.O.M 2023.05.01
(v1.1.0).
Things I Tried (No Luck):
- No modifiers: Used only the default
BottomSheetDefaults.windowInsets
. - Applied the
.safeDrawingPadding()
modifier. - Applied the
.statusBarsPadding()
modifier.
Observations (Screenshots Below):
- #1: The BottomSheet is
edgeToEdge
, covering the status bar content. - #2: Adds way too much padding—more than what’s necessary.
- #3: Adds extra padding, but slightly less than #2.
Temporary Solution:
For now, I’ve downgraded back to B.O.M 2023.05.01
, hopefully, newer versions of material3
(v1.1.1+) will resolve this issue, however, updating to the most recent ones (1.3+) requires tackling significant tech debt.
Description
After looking through all components that support Insets,
ModalBottomSheet
doesn't expose the option to change theWindowInset
that it applies. This goes against the other components that use insets.All the other components (
TopAppBar
,BottomAppBar
etc), expose awindowInsets
parameter. Any component that consumes a window inset, should allow for this to be changed as not everyone is using insets in the exact same standard way.