ui: improve bottom sheet edge-to-edge support

Don't disable bottom sheet inset calculations and use the expanded
state hack to mitigate for the peek height calculation, instead,
just clobber the window inset routine to fix the peek height while
not applying the padding. The expanded hack still remains, but is
now relegated to the cases where the 16:9 keyline breaks down.
This commit is contained in:
Alexander Capehart
2023-08-14 17:46:01 -06:00
parent 4ade27e66d
commit ada29b2f7a
3 changed files with 71 additions and 17 deletions
-8
View File
@@ -32,19 +32,11 @@
</style>
<style name="Widget.Auxio.BottomSheet" parent="Widget.Material3.BottomSheet">
<item name="marginLeftSystemWindowInsets">false</item>
<item name="marginRightSystemWindowInsets">false</item>
<item name="paddingBottomSystemWindowInsets">false</item>
<item name="paddingTopSystemWindowInsets">false</item>
<item name="shapeAppearance">@style/ShapeAppearance.Material3.Corner.None</item>
<item name="shouldRemoveExpandedCorners">true</item>
</style>
<style name="Widget.Auxio.BottomSheet.Modal" parent="Widget.Material3.BottomSheet.Modal">
<item name="marginLeftSystemWindowInsets">false</item>
<item name="marginRightSystemWindowInsets">false</item>
<item name="paddingBottomSystemWindowInsets">false</item>
<item name="paddingTopSystemWindowInsets">false</item>
<item name="shapeAppearance">@style/ShapeAppearance.Material3.Corner.None</item>
<item name="shouldRemoveExpandedCorners">true</item>
</style>