@@ -563,31 +563,26 @@ bottomSheetBehavior.removeBottomSheetCallback(bottomSheetCallback)
563
563
<details >
564
564
<summary ><h3 >Handling insets and fullscreen</h3 ></summary >
565
565
566
- ` BottomSheetBehavior ` can automatically handle insets (such as for
567
- [ edge to edge] ( https://developer.android.com/training/gestures/edge-to-edge ) ) by
568
- specifying any of these to true on the view:
566
+ ` BottomSheetBehavior ` automatically handles window insets by applying padding to
567
+ the top and bottom of the view and margins to the left and right. These
568
+ paddings and margins can be customized by specifying any of the following
569
+ attributes on the view:
569
570
570
571
* ` app:paddingBottomSystemWindowInsets `
571
572
* ` app:paddingLeftSystemWindowInsets `
572
573
* ` app:paddingRightSystemWindowInsets `
573
574
* ` app:paddingTopSystemWindowInsets `
574
575
575
- On API 21 and above the modal bottom sheet will be rendered fullscreen (edge to
576
- edge) if the navigation bar is transparent and ` enableEdgeToEdge ` is true.
577
- To enable edge-to-edge by default for modal bottom sheets, you can override
578
- ` ?attr/bottomSheetDialogTheme ` like the below example (` enableEdgeToEdge ` is
579
- already true in ` ThemeOverlay.Material3.BottomSheetDialog ` ):
576
+ * ` app:marginLeftSystemWindowInsets `
577
+ * ` app:marginRightSystemWindowInsets `
578
+ * ` app:marginTopSystemWindowInsets `
580
579
581
- ``` xml
582
- < style name = " AppTheme " parent = " Theme.Material3.* " >
583
- ...
584
- < item name = " bottomSheetDialogTheme " >@style/ThemeOverlay.App.BottomSheetDialog</ item >
585
- </ style >
580
+ Modal bottom sheets are rendered fullscreen by default. On API 21-34, this can
581
+ be overriden by setting ` enableEdgeToEdge ` to ` false ` in your
582
+ ` ?attr/bottomSheetDialogTheme ` ThemeOverlay. On API 35 and above,
583
+ ` enableEdgeToEdge ` has been deprecated and will no longer take effect. To
584
+ learn more, read about [ edge-to-edge enforcement on Android 15 ] ( https://developer.android.com/about/versions/15/behavior-changes-15#edge-to-edge ) .
586
585
587
- <style name =" ThemeOverlay.App.BottomSheetDialog" parent =" ThemeOverlay.Material3.BottomSheetDialog" >
588
- <item name =" android:navigationBarColor" >@android:color/transparent<item >
589
- </style >
590
- ```
591
586
Insets can be added automatically if any of the padding attributes above are set
592
587
to true in the style, either by updating the style passed to the constructor, or
593
588
by updating the default style specified by the ` ?attr/bottomSheetDialogTheme `
0 commit comments