Add rounded corners to bottom sheet dialog.

Note these are currently only visible in the collapsed state.
- [Google issue](https://issuetracker.google.com/issues/144859239)
- [Rejected PR](https://github.com/material-components/material-components-android/pull/437)
- [Github issue](https://github.com/material-components/material-components-android/issues/1278)
This commit is contained in:
Jonny Andrew 2022-10-20 16:13:18 +01:00
parent bec7143824
commit 17c43c9188
No known key found for this signature in database
GPG key ID: 2B6F5CF6A1EEB0B8
3 changed files with 12 additions and 3 deletions

View file

@ -14,6 +14,7 @@
<!-- Default color for text View -->
<item name="android:textColorTertiary">@color/element_content_primary_light</item>
<item name="android:textColorLink">@color/element_link_light</item>
<item name="bottomSheetStyle">@style/BottomSheetStyle</item>
</style>
<style name="Theme.Vector.BottomSheetDialog.Dark" parent="Theme.MaterialComponents.BottomSheetDialog">
@ -28,6 +29,7 @@
<!-- Default color for text View -->
<item name="android:textColorTertiary">@color/element_content_primary_dark</item>
<item name="android:textColorLink">@color/element_link_dark</item>
<item name="bottomSheetStyle">@style/BottomSheetStyle</item>
</style>
<style name="Theme.Vector.BottomSheetDialog.Black" parent="Theme.Vector.BottomSheetDialog.Dark">
@ -35,6 +37,15 @@
</style>
<!-- BottomSheet style -->
<style name="BottomSheetStyle" parent="Widget.MaterialComponents.BottomSheet.Modal">
<item name="shapeAppearance">@style/BottomSheetShapeAppearance</item>
</style>
<style name="BottomSheetShapeAppearance" parent="">
<item name="cornerFamily">rounded</item>
<item name="cornerSize">20dp</item>
</style>
<style name="BottomSheetItemTextMain">
<item name="android:fontFamily">sans-serif-medium</item>
<item name="android:layout_width">0dp</item>

View file

@ -3,7 +3,6 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?colorSurface"
android:orientation="vertical">
<androidx.core.widget.NestedScrollView

View file

@ -10,7 +10,6 @@
android:id="@+id/bottomSheetActionClickableZone"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?colorSurface"
android:clickable="true"
android:focusable="true"
android:foreground="?attr/selectableItemBackground"
@ -93,4 +92,4 @@
</androidx.constraintlayout.widget.ConstraintLayout>
</merge>
</merge>