material-components / material-components-android

Modular and customizable Material Design UI components for Android
Apache License 2.0
16.42k stars 3.08k forks source link

[BottomSheet] Widget.Material3.BottomSheet.Modal should have enableEdgeToEdge by default, otherwise there will be a gap at the system navigation bar if the app uses a custom theme #4367

Open ashnohe opened 2 weeks ago

ashnohe commented 2 weeks ago

Widget.Material3.BottomSheet.Modal should have <item name="enableEdgeToEdge">true</item> by default for SDK 35+, otherwise there will be a gap at the system navigation bar if the app uses a custom theme that inherits from Widget.Material3.BottomSheet.Modal and targets SDK 35 (at which point edge-to-edge is enforced).

See attached images, one showing a gap without enableEdgeToEdge and without a gap with enableEdgeToEdge.

Screenshot 2024-11-01 at 5 26 17 PM Screenshot 2024-11-01 at 5 27 04 PM

The documentation should also be updated to talk about the new BottomSheet behavior.