Closed ColtonIdle closed 2 years ago
Is that style your bottomSheetDialogTheme
? Or the theme for your whole app?
It should be set like this in your app's theme:
<style name="Theme.Catalog" parent="Theme.MaterialComponents.DayNight.NoActionBar">
<item name="catalogToolbarStyle">@style/Widget.Catalog.Toolbar</item>
<item name="catalogToolbarWithCloseButtonStyle">@style/Widget.Catalog.Toolbar.WithCloseButton</item>
<item name="textInputSignInStyle">@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox</item>
<item name="bottomSheetDialogTheme">@style/ThemeOverlay.Catalog.BottomSheetDialog</item>
<item name="windowActionModeOverlay">true</item>
</style>
Where ThemeOverlay.Catalog.BottomSheetDialog
is like this:
<style name="ThemeOverlay.Catalog.BottomSheetDialog" parent="ThemeOverlay.MaterialComponents.BottomSheetDialog">
<item name="paddingBottomSystemWindowInsets">true</item>
</style>
At least that's my understanding.
Well it's meant to be set in the bottom sheet styles. (Setting it in themes of course also works though...)
So I think the name is fine. And since it's a public API we can't really to change it either...
No idea that it was supposed to be put there. I think when I originally read the docs/rel notes on it that didn't seem clear. But that's probably because themes/styles in android view land can be insanely hard to understand. I haven't touched views in like a year since I'm all on the compose train now, so feel free to close whatever bugs I opened here lol
Bottom sheets now apparently adhere to these theme styles:
Which is a little misleading in my opinion because it seems like setting paddingBottomSystemWindowInsets will enable padding throughout the whole app.
Am I applying the attributes in the wrong place? Wouldn't a better name be
bottomSheetEnableEdgeToEdge
andbottomSheetPaddingBottomSystemWindowInsets
?