Fix AlertDialogs
This commit is contained in:
@@ -34,7 +34,7 @@ abstract class BaseBottomSheet<B : ViewBinding> :
|
||||
}
|
||||
|
||||
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
|
||||
return if (resources.getBoolean(R.bool.isTablet)) {
|
||||
return if (resources.getBoolean(R.bool.is_tablet)) {
|
||||
AppCompatDialog(context, theme)
|
||||
} else super.onCreateDialog(savedInstanceState)
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ class PagesThumbnailsSheet : BaseBottomSheet<SheetPagesBinding>(),
|
||||
binding.toolbar.setNavigationOnClickListener { dismiss() }
|
||||
binding.toolbar.subtitle = null
|
||||
|
||||
if (!resources.getBoolean(R.bool.isTablet)) {
|
||||
if (!resources.getBoolean(R.bool.is_tablet)) {
|
||||
binding.toolbar.navigationIcon = null
|
||||
} else {
|
||||
binding.toolbar.subtitle =
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
android:id="@+id/toolbar_card"
|
||||
android:background="@drawable/toolbar_background"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
|
||||
@@ -29,9 +29,9 @@
|
||||
android:gravity="center_vertical"
|
||||
android:singleLine="true"
|
||||
android:text="@string/app_name"
|
||||
android:textAppearance="?attr/textAppearanceLabelLarge" />
|
||||
android:textAppearance="?attr/textAppearanceTitleMedium" />
|
||||
|
||||
<View
|
||||
<com.google.android.material.divider.MaterialDivider
|
||||
android:id="@+id/divider"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<bool name="lightStatusBar">false</bool>
|
||||
<bool name="lightNavigationBar">false</bool>
|
||||
<bool name="elevationOverlayEnabled">true</bool>
|
||||
<bool name="light_status_bar">false</bool>
|
||||
<bool name="light_navigation_bar">false</bool>
|
||||
<bool name="elevation_overlay_enabled">true</bool>
|
||||
</resources>
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<bool name="lightStatusBar">true</bool>
|
||||
<bool name="lightNavigationBar">true</bool>
|
||||
<bool name="light_status_bar">true</bool>
|
||||
<bool name="light_navigation_bar">true</bool>
|
||||
</resources>
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
<style name="Base.V27.Kotatsu" parent="Base.Theme.Kotatsu">
|
||||
<item name="android:navigationBarColor">@android:color/transparent</item>
|
||||
<item name="android:windowLightNavigationBar">@bool/lightNavigationBar</item>
|
||||
<item name="android:windowLightNavigationBar">@bool/light_navigation_bar</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.Kotatsu" parent="Base.V27.Kotatsu" />
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<bool name="isTablet">true</bool>
|
||||
<bool name="is_tablet">true</bool>
|
||||
</resources>
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<bool name="isTablet">false</bool>
|
||||
<bool name="lightStatusBar">true</bool>
|
||||
<bool name="lightNavigationBar">false</bool>
|
||||
<bool name="elevationOverlayEnabled">false</bool>
|
||||
<bool name="is_tablet">false</bool>
|
||||
<bool name="light_status_bar">true</bool>
|
||||
<bool name="light_navigation_bar">false</bool>
|
||||
<bool name="elevation_overlay_enabled">false</bool>
|
||||
</resources>
|
||||
@@ -28,5 +28,8 @@
|
||||
|
||||
<!--Text dimens-->
|
||||
<dimen name="text_size_h1">22sp</dimen>
|
||||
<dimen name="menu_radius">16dp</dimen>
|
||||
|
||||
<item name="material_emphasis_medium" format="float" type="dimen">0.6</item>
|
||||
|
||||
</resources>
|
||||
@@ -16,6 +16,7 @@
|
||||
<item name="android:background">?attr/colorSurface</item>
|
||||
<item name="android:textColorPrimary">?attr/colorOnSurface</item>
|
||||
<item name="android:textColor">?attr/colorOnSurface</item>
|
||||
<item name="dialogCornerRadius">28dp</item>
|
||||
</style>
|
||||
|
||||
<!-- Widget styles -->
|
||||
@@ -84,7 +85,7 @@
|
||||
</style>
|
||||
|
||||
<style name="ThemeOverlay.Kotatsu.Switch" parent="">
|
||||
<item name="elevationOverlayEnabled">@bool/elevationOverlayEnabled</item>
|
||||
<item name="elevationOverlayEnabled">@bool/elevation_overlay_enabled</item>
|
||||
</style>
|
||||
|
||||
<!-- TextAppearance -->
|
||||
|
||||
@@ -43,14 +43,14 @@
|
||||
<item name="android:textDirection">locale</item>
|
||||
|
||||
<!-- Themes -->
|
||||
<item name="android:windowLightStatusBar" tools:targetApi="M">@bool/lightStatusBar</item>
|
||||
<item name="android:windowLightStatusBar" tools:targetApi="M">@bool/light_status_bar</item>
|
||||
<item name="android:statusBarColor">@android:color/transparent</item>
|
||||
<item name="android:navigationBarColor">@color/surface_amoled</item>
|
||||
<item name="android:navigationBarDividerColor" tools:targetApi="o_mr1">@null</item>
|
||||
<item name="android:enforceNavigationBarContrast" tools:targetApi="Q">false</item>
|
||||
<item name="android:enforceStatusBarContrast" tools:targetApi="Q">false</item>
|
||||
<item name="android:itemTextAppearance">@style/TextAppearance.Widget.Menu</item>
|
||||
<item name="android:alertDialogTheme">@style/ThemeOverlay.Kotatsu.MaterialAlertDialog</item>
|
||||
<item name="alertDialogTheme">@style/ThemeOverlay.Kotatsu.MaterialAlertDialog</item>
|
||||
<item name="materialAlertDialogTheme">@style/ThemeOverlay.Kotatsu.MaterialAlertDialog</item>
|
||||
<item name="textAppearanceButton">@style/TextAppearance.Kotatsu.Button</item>
|
||||
<item name="android:buttonStyle">?attr/borderlessButtonStyle</item>
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<PreferenceScreen
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<ListPreference
|
||||
android:defaultValue="-1"
|
||||
|
||||
Reference in New Issue
Block a user