From c3fb5af3fcbeee4f3579435b832907d8165cb42e Mon Sep 17 00:00:00 2001 From: Ivan Iskandar <12537387+ivaniskandar@users.noreply.github.com> Date: Sun, 20 Jun 2021 22:05:37 +0700 Subject: [PATCH] Fix issues on older API versions and tablets (#5433) * Fix tablet's navigation rail and toolbar color * Fix tracking sheet crash on older APIs * Fix settings crash on older APIs --- app/src/main/res/color/ripple_colored.xml | 4 ---- .../main/res/layout-sw720dp/main_activity.xml | 6 +----- app/src/main/res/layout/track_item.xml | 15 +++++---------- app/src/main/res/values/colors.xml | 8 ++++++++ app/src/main/res/values/themes.xml | 19 +++++++++++++------ 5 files changed, 27 insertions(+), 25 deletions(-) delete mode 100644 app/src/main/res/color/ripple_colored.xml diff --git a/app/src/main/res/color/ripple_colored.xml b/app/src/main/res/color/ripple_colored.xml deleted file mode 100644 index 71e20d7242..0000000000 --- a/app/src/main/res/color/ripple_colored.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/app/src/main/res/layout-sw720dp/main_activity.xml b/app/src/main/res/layout-sw720dp/main_activity.xml index 9e357023b3..60557ceded 100644 --- a/app/src/main/res/layout-sw720dp/main_activity.xml +++ b/app/src/main/res/layout-sw720dp/main_activity.xml @@ -23,7 +23,6 @@ android:id="@+id/toolbar" android:layout_width="match_parent" android:layout_height="?attr/actionBarSize" - android:background="?attr/colorPrimary" android:theme="?attr/actionBarTheme" /> @@ -72,13 +71,10 @@ + android:background="?android:divider" /> + android:background="?android:divider"/> + android:background="?android:divider" /> @color/md_black_1000_12 @color/md_white_1000 @color/md_grey_50 + @color/md_blue_A400_12 #54759E @@ -14,15 +15,18 @@ #ED4A65 + #1FED4A65 #FC8C5C + #1FFC8C5C #3399FF @color/md_white_1000_12 #242529 #202125 + #1F3399FF #54759E @@ -30,20 +34,24 @@ #48E484 + #1F48E484 #F02475 #16151D #201F27 + #1FF02475 #3399FF @android:color/transparent @color/md_black_1000 @color/md_black_1000 + #1F3399FF #FF3399 + #1FFF3399 #242529 diff --git a/app/src/main/res/values/themes.xml b/app/src/main/res/values/themes.xml index bd79e5cfcc..0396e81614 100644 --- a/app/src/main/res/values/themes.xml +++ b/app/src/main/res/values/themes.xml @@ -27,7 +27,7 @@ @drawable/line_divider - @color/ripple_colored + @color/ripple_colored_light ?attr/colorControlHighlight @@ -58,6 +58,7 @@ @style/Widget.MaterialComponents.Toolbar.Surface @style/Widget.Tachiyomi.TabLayout @style/Widget.MaterialComponents.BottomNavigationView + @style/Widget.MaterialComponents.NavigationRailView @style/TextAppearance.Widget.Button @@ -110,7 +111,7 @@ @style/Widget.Tachiyomi.Toolbar.Primary @style/Widget.Tachiyomi.TabLayout.Colored @style/Widget.MaterialComponents.BottomNavigationView.Colored - + @style/Widget.MaterialComponents.NavigationRailView.Colored false @@ -124,6 +125,7 @@ @color/accent_strawberry @color/md_blue_A400 + @color/ripple_colored_strawberry @@ -131,6 +133,7 @@ @color/accent_yotsuba @color/md_blue_A400 + @color/ripple_colored_yotsuba @@ -159,7 +162,7 @@ @drawable/line_divider - @color/ripple_colored + @color/ripple_colored_dark ?attr/colorControlHighlight @@ -190,6 +193,7 @@ @style/Widget.MaterialComponents.Toolbar.Surface @style/Widget.Tachiyomi.TabLayout @style/Widget.MaterialComponents.BottomNavigationView + @style/Widget.MaterialComponents.NavigationRailView false @@ -231,6 +235,7 @@ @style/Widget.Tachiyomi.Toolbar.Primary @style/Widget.Tachiyomi.TabLayout.Colored @style/Widget.MaterialComponents.BottomNavigationView.Colored + @style/Widget.MaterialComponents.NavigationRailView.Colored ?attr/colorPrimary @@ -243,6 +248,7 @@ @color/accent_greenapple @color/md_black_1000 @color/md_blue_A400 + @color/ripple_colored_greenapple @@ -251,9 +257,8 @@ @color/accent_midnightdusk @color/md_blue_A400 @color/surface_midnightdusk - - @color/background_midnightdusk + @color/ripple_colored_midnightdusk @@ -282,7 +287,7 @@ @drawable/line_divider - @color/ripple_colored + @color/ripple_colored_amoled ?attr/colorControlHighlight @@ -312,6 +317,7 @@ @style/Widget.MaterialComponents.Toolbar.Surface @style/Widget.Tachiyomi.TabLayout @style/Widget.MaterialComponents.BottomNavigationView + @style/Widget.MaterialComponents.NavigationRailView false @@ -340,6 +346,7 @@ @color/accent_hotpink @color/md_blue_A400 + @color/ripple_colored_hotpink