From a8a761aa5f6487fa6bf70d192cc73eb5a345d91c Mon Sep 17 00:00:00 2001 From: arkon Date: Tue, 19 Oct 2021 17:41:59 -0400 Subject: [PATCH] Initial pass of Material 3 styling Adjustments/fixes to follow. --- .../data/preference/PreferencesHelper.kt | 1 - .../ui/setting/SettingsAdvancedController.kt | 1 - .../tachiyomi/widget/MaterialSpinnerView.kt | 4 +- app/src/main/res/layout/categories_item.xml | 5 +- .../main/res/layout/dialog_stub_textinput.xml | 1 - app/src/main/res/layout/download_header.xml | 3 +- .../main/res/layout/main_activity_toolbar.xml | 57 ------------------- .../main/res/layout/navigation_view_text.xml | 2 +- ...pinner_preference.xml => pref_spinner.xml} | 2 - app/src/main/res/layout/pref_theme_item.xml | 2 +- app/src/main/res/layout/pref_tracker_item.xml | 1 + app/src/main/res/layout/track_item.xml | 1 + .../main/res/layout/track_search_dialog.xml | 2 +- app/src/main/res/values/styles.xml | 52 ++++++++--------- app/src/main/res/values/themes.xml | 13 +++-- 15 files changed, 45 insertions(+), 102 deletions(-) delete mode 100644 app/src/main/res/layout/main_activity_toolbar.xml rename app/src/main/res/layout/{spinner_preference.xml => pref_spinner.xml} (95%) diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferencesHelper.kt b/app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferencesHelper.kt index 740bebb6e..d304bb8ae 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferencesHelper.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferencesHelper.kt @@ -19,7 +19,6 @@ import eu.kanade.tachiyomi.ui.library.setting.SortModeSetting import eu.kanade.tachiyomi.ui.reader.setting.OrientationType import eu.kanade.tachiyomi.ui.reader.setting.ReadingModeType import eu.kanade.tachiyomi.util.system.MiuiUtil -import eu.kanade.tachiyomi.util.system.isTablet import eu.kanade.tachiyomi.widget.ExtendedNavigationView import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.onEach diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsAdvancedController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsAdvancedController.kt index 1030286c2..810a84801 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsAdvancedController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsAdvancedController.kt @@ -38,7 +38,6 @@ import eu.kanade.tachiyomi.util.preference.switchPreference import eu.kanade.tachiyomi.util.preference.titleRes import eu.kanade.tachiyomi.util.system.MiuiUtil import eu.kanade.tachiyomi.util.system.isPackageInstalled -import eu.kanade.tachiyomi.util.system.isTablet import eu.kanade.tachiyomi.util.system.powerManager import eu.kanade.tachiyomi.util.system.toast import uy.kohesive.injekt.injectLazy diff --git a/app/src/main/java/eu/kanade/tachiyomi/widget/MaterialSpinnerView.kt b/app/src/main/java/eu/kanade/tachiyomi/widget/MaterialSpinnerView.kt index 49863d7a8..7ba92ba07 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/widget/MaterialSpinnerView.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/widget/MaterialSpinnerView.kt @@ -15,7 +15,7 @@ import androidx.core.view.forEach import androidx.core.view.get import com.tfcporciuncula.flow.Preference import eu.kanade.tachiyomi.R -import eu.kanade.tachiyomi.databinding.SpinnerPreferenceBinding +import eu.kanade.tachiyomi.databinding.PrefSpinnerBinding import eu.kanade.tachiyomi.util.system.getResourceColor class MaterialSpinnerView @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null) : @@ -46,7 +46,7 @@ class MaterialSpinnerView @JvmOverloads constructor(context: Context, attrs: Att } } - private val binding = SpinnerPreferenceBinding.inflate(LayoutInflater.from(context), this, false) + private val binding = PrefSpinnerBinding.inflate(LayoutInflater.from(context), this, false) init { addView(binding.root) diff --git a/app/src/main/res/layout/categories_item.xml b/app/src/main/res/layout/categories_item.xml index 48e727711..876cb1c3b 100644 --- a/app/src/main/res/layout/categories_item.xml +++ b/app/src/main/res/layout/categories_item.xml @@ -7,7 +7,8 @@ android:layout_height="wrap_content" app:cardBackgroundColor="?android:attr/colorBackground" app:cardElevation="0dp" - app:cardForegroundColor="@color/draggable_card_foreground"> + app:cardForegroundColor="@color/draggable_card_foreground" + app:strokeWidth="0dp"> - \ No newline at end of file + diff --git a/app/src/main/res/layout/dialog_stub_textinput.xml b/app/src/main/res/layout/dialog_stub_textinput.xml index 4bbc29d20..057f9c718 100644 --- a/app/src/main/res/layout/dialog_stub_textinput.xml +++ b/app/src/main/res/layout/dialog_stub_textinput.xml @@ -6,7 +6,6 @@ android:paddingVertical="16dp"> diff --git a/app/src/main/res/layout/download_header.xml b/app/src/main/res/layout/download_header.xml index 191e7e315..9e8779fe2 100644 --- a/app/src/main/res/layout/download_header.xml +++ b/app/src/main/res/layout/download_header.xml @@ -8,7 +8,8 @@ android:layout_marginTop="8dp" app:cardBackgroundColor="?android:attr/colorBackground" app:cardElevation="0dp" - app:cardForegroundColor="@color/draggable_card_foreground"> + app:cardForegroundColor="@color/draggable_card_foreground" + app:strokeWidth="0dp"> - - - - - - - - - - - - - - - - - - - diff --git a/app/src/main/res/layout/navigation_view_text.xml b/app/src/main/res/layout/navigation_view_text.xml index 4fe2f2b53..bdc767b11 100644 --- a/app/src/main/res/layout/navigation_view_text.xml +++ b/app/src/main/res/layout/navigation_view_text.xml @@ -10,7 +10,7 @@ diff --git a/app/src/main/res/layout/pref_tracker_item.xml b/app/src/main/res/layout/pref_tracker_item.xml index c740adb6c..bc5787ad6 100644 --- a/app/src/main/res/layout/pref_tracker_item.xml +++ b/app/src/main/res/layout/pref_tracker_item.xml @@ -14,6 +14,7 @@ android:layout_height="48dp" app:cardBackgroundColor="#2E51A2" app:cardElevation="0dp" + app:strokeWidth="0dp" app:shapeAppearanceOverlay="@style/ShapeAppearanceOverlay.MaterialCardView.Tracker"> - @@ -30,7 +30,7 @@ - - @@ -67,23 +67,19 @@ - - - + @@ -115,16 +111,16 @@ - - - - @@ -152,7 +147,7 @@ - - - + - @@ -204,7 +200,7 @@ - @@ -213,12 +209,16 @@ - - @@ -252,7 +252,7 @@ @dimen/card_radius -