[leanback] fix dialog style

pull/183/head
FongMi 3 years ago
parent 93eec85589
commit 4002e482a1
  1. 15
      app/src/leanback/res/drawable/shape_bottom_sheet.xml
  2. 7
      app/src/leanback/res/layout/dialog_track.xml
  3. 1
      app/src/leanback/res/values/styles.xml
  4. 12
      app/src/main/res/values/styles.xml
  5. 12
      app/src/mobile/res/values/styles.xml

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@color/white_90" />
<corners
android:topLeftRadius="12dp"
android:topRightRadius="12dp" />
<padding
android:bottom="8dp"
android:top="8dp" />
</shape>

@ -4,6 +4,9 @@
android:id="@+id/recycler"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="16dp"
android:paddingStart="16dp"
android:paddingTop="8dp"
android:paddingEnd="16dp"
android:paddingBottom="8dp"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
app:maxHeight="220dp" />
app:maxHeight="206dp" />

@ -11,6 +11,7 @@
<item name="android:windowFullscreen">true</item>
<item name="android:windowTranslucentStatus">true</item>
<item name="android:windowTranslucentNavigation">true</item>
<item name="bottomSheetDialogTheme">@style/BottomSheetDialog</item>
</style>
</resources>

@ -30,4 +30,16 @@
<item name="keep_content_on_player_reset">true</item>
</style>
<style name="BottomSheetModal" parent="Widget.Design.BottomSheet.Modal">
<item name="android:background">@drawable/shape_bottom_sheet</item>
</style>
<style name="BottomSheetDialog.Base" parent="Theme.MaterialComponents.Light.BottomSheetDialog">
<item name="bottomSheetStyle">@style/BottomSheetModal</item>
<item name="android:backgroundDimEnabled">false</item>
<item name="android:windowIsFloating">false</item>
</style>
<style name="BottomSheetDialog" parent="BottomSheetDialog.Base" />
</resources>

@ -18,16 +18,4 @@
<item name="bottomSheetDialogTheme">@style/BottomSheetDialog</item>
</style>
<style name="BottomSheetModal" parent="Widget.Design.BottomSheet.Modal">
<item name="android:background">@drawable/shape_bottom_sheet</item>
</style>
<style name="BottomSheetDialog.Base" parent="Theme.MaterialComponents.Light.BottomSheetDialog">
<item name="bottomSheetStyle">@style/BottomSheetModal</item>
<item name="android:backgroundDimEnabled">false</item>
<item name="android:windowIsFloating">false</item>
</style>
<style name="BottomSheetDialog" parent="BottomSheetDialog.Base" />
</resources>

Loading…
Cancel
Save