Skip to content

Commit 57a3c98

Browse files
drchenpekingme
authored andcommittedJun 8, 2022
[Doc] Add an example to demonstrate how to make bottom sheet dialog edge-to-edge
PiperOrigin-RevId: 453451473
1 parent 11578b3 commit 57a3c98

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed
 

‎docs/components/BottomSheet.md

+13
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,19 @@ specifying any of these to true on the view:
198198

199199
On API 21 and above the modal bottom sheet will be rendered fullscreen (edge to
200200
edge) if the navigation bar is transparent and `app:enableEdgeToEdge` is true.
201+
To enable edge-to-edge by default for modal bottom sheets, you can override
202+
`?attr/bottomSheetDialogTheme` like the below example:
203+
204+
```
205+
<style name="AppTheme" parent="Theme.Material3.*">
206+
...
207+
<item name="bottomSheetDialogTheme">@style/ThemeOverlay.App.BottomSheetDialog</item>
208+
</style>
209+
210+
<style name="ThemeOverlay.App.BottomSheetDialog" parent="ThemeOverlay.Material3.BottomSheetDialog">
211+
<item name="android:navigationBarColor" tools:ignore="NewApi">@android:color/transparent</item>
212+
</style>
213+
```
201214

202215
Insets can be added automatically if any of the padding attributes above are set
203216
to true in the style, either by updating the style passed to the constructor, or

0 commit comments

Comments
 (0)
Please sign in to comment.