Use Material dialogs for preferences

Partially addresses #2907
This commit is contained in:
arkon 2021-03-13 17:42:49 -05:00
parent 18b1326f3a
commit 112e233498
3 changed files with 16 additions and 3 deletions

View File

@ -233,7 +233,7 @@ dependencies {
implementation("com.bluelinelabs:conductor-support:2.1.5") {
exclude(group = "com.android.support")
}
implementation("com.github.tachiyomiorg:conductor-support-preference:1.1.1")
implementation("com.github.tachiyomiorg:conductor-support-preference:2.0.0")
// FlowBinding
val flowbindingVersion = "0.12.0"

View File

@ -31,6 +31,9 @@
<item name="android:windowMinWidthMinor">@android:dimen/dialog_min_width_minor</item>
<item name="android:background">?attr/colorSurface</item>
<item name="shapeAppearanceOverlay">@style/Theme.MaterialAlertDialog.Style.ShapeAppearance</item>
<item name="materialAlertDialogTitleTextStyle">@style/Theme.MaterialAlertDialog.Style.Title</item>
<item name="android:textColorPrimary">?attr/colorOnSurface</item>
<item name="android:textColor">?attr/colorOnSurface</item>
@ -39,6 +42,16 @@
<item name="buttonBarNeutralButtonStyle">@style/Theme.Widget.Button</item>
</style>
<style name="Theme.MaterialAlertDialog.Style.ShapeAppearance" parent="">
<item name="cornerSize">@dimen/dialog_radius</item>
</style>
<style name="Theme.MaterialAlertDialog.Style.Title" parent="@style/MaterialAlertDialog.MaterialComponents.Title.Text">
<item name="android:textColor">?android:textColorPrimary</item>
<item name="android:textSize">@dimen/md_title_textsize</item>
<item name="android:fontFamily">sans-serif-medium</item>
</style>
<style name="Theme.AlertDialog.Light" parent="Theme.AlertDialog">
<item name="colorAccent">@color/colorAccentLight</item>
</style>

View File

@ -56,7 +56,7 @@
<item name="toolbarNavigationButtonStyle">@style/Theme.Toolbar.Navigation</item>
<item name="preferenceTheme">@style/PreferenceThemeOverlay</item>
<item name="dialogTheme">@style/Theme.AlertDialog.Light</item>
<item name="alertDialogTheme">@style/Theme.AlertDialog.Dark</item>
<item name="materialAlertDialogTheme">@style/Theme.AlertDialog.Light</item>
<item name="bottomSheetDialogTheme">@style/Theme.BottomSheet</item>
<item name="chipStyle">@style/Theme.Widget.Chip</item>
<item name="buttonStyle">@style/Theme.Widget.Button</item>
@ -150,7 +150,7 @@
<item name="toolbarNavigationButtonStyle">@style/Theme.Toolbar.Navigation</item>
<item name="preferenceTheme">@style/PreferenceThemeOverlay</item>
<item name="dialogTheme">@style/Theme.AlertDialog.Dark</item>
<item name="alertDialogTheme">@style/Theme.AlertDialog.Dark</item>
<item name="materialAlertDialogTheme">@style/Theme.AlertDialog.Dark</item>
<item name="bottomSheetDialogTheme">@style/Theme.BottomSheet</item>
<item name="chipStyle">@style/Theme.Widget.Chip</item>
<item name="buttonStyle">@style/Theme.Widget.Button</item>