mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-12-22 13:21:49 +01:00
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
This commit is contained in:
parent
859e8deb02
commit
c3fb5af3fc
@ -1,4 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:alpha="0.12" android:color="?attr/colorPrimary" />
|
||||
</selector>
|
@ -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" />
|
||||
|
||||
</eu.kanade.tachiyomi.widget.ElevationAppBarLayout>
|
||||
@ -72,13 +71,10 @@
|
||||
|
||||
<com.google.android.material.navigationrail.NavigationRailView
|
||||
android:id="@+id/side_nav"
|
||||
style="@style/Widget.MaterialComponents.NavigationRailView.Colored"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="0dp"
|
||||
app:elevation="0dp"
|
||||
app:itemIconTint="@color/nav_selector"
|
||||
app:itemRippleColor="?attr/colorControlHighlight"
|
||||
app:itemTextColor="@color/nav_selector"
|
||||
app:itemRippleColor="@color/ripple_toolbar_fainter"
|
||||
app:labelVisibilityMode="labeled"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
|
@ -71,8 +71,7 @@
|
||||
android:id="@+id/top_divider"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:alpha="0.25"
|
||||
android:background="?android:attr/textColorHint" />
|
||||
android:background="?android:divider" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/middle_row"
|
||||
@ -98,8 +97,7 @@
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:alpha="0.25"
|
||||
android:background="?android:attr/textColorHint"
|
||||
android:background="?android:divider"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
@ -121,8 +119,7 @@
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:alpha="0.25"
|
||||
android:background="?android:attr/textColorHint"/>
|
||||
android:background="?android:divider"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/track_score"
|
||||
@ -143,8 +140,7 @@
|
||||
android:id="@+id/bottom_divider"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:alpha="0.25"
|
||||
android:background="?android:attr/textColorHint" />
|
||||
android:background="?android:divider" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/bottom_row"
|
||||
@ -170,8 +166,7 @@
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:alpha="0.25"
|
||||
android:background="?android:attr/textColorHint"
|
||||
android:background="?android:divider"
|
||||
app:layout_constraintBottom_toBottomOf="parent" />
|
||||
|
||||
<TextView
|
||||
|
@ -7,6 +7,7 @@
|
||||
<color name="divider_light">@color/md_black_1000_12</color>
|
||||
<color name="surface_light">@color/md_white_1000</color>
|
||||
<color name="background_light">@color/md_grey_50</color>
|
||||
<color name="ripple_colored_light">@color/md_blue_A400_12</color>
|
||||
|
||||
<!-- Light Blue Theme -->
|
||||
<color name="accent_lightblue">#54759E</color>
|
||||
@ -14,15 +15,18 @@
|
||||
|
||||
<!-- Strawberry Daiquiri Theme -->
|
||||
<color name="accent_strawberry">#ED4A65</color>
|
||||
<color name="ripple_colored_strawberry">#1FED4A65</color>
|
||||
|
||||
<!-- Yotsuba Theme -->
|
||||
<color name="accent_yotsuba">#FC8C5C</color>
|
||||
<color name="ripple_colored_yotsuba">#1FFC8C5C</color>
|
||||
|
||||
<!-- Dark Theme -->
|
||||
<color name="accent_dark">#3399FF</color>
|
||||
<color name="divider_dark">@color/md_white_1000_12</color>
|
||||
<color name="surface_dark">#242529</color>
|
||||
<color name="background_dark">#202125</color>
|
||||
<color name="ripple_colored_dark">#1F3399FF</color>
|
||||
|
||||
<!-- Dark Blue Theme -->
|
||||
<color name="accent_darkblue">#54759E</color>
|
||||
@ -30,20 +34,24 @@
|
||||
|
||||
<!-- Green Apple Theme -->
|
||||
<color name="accent_greenapple">#48E484</color>
|
||||
<color name="ripple_colored_greenapple">#1F48E484</color>
|
||||
|
||||
<!-- Midnight Dusk Theme -->
|
||||
<color name="accent_midnightdusk">#F02475</color>
|
||||
<color name="background_midnightdusk">#16151D</color>
|
||||
<color name="surface_midnightdusk">#201F27</color>
|
||||
<color name="ripple_colored_midnightdusk">#1FF02475</color>
|
||||
|
||||
<!-- AMOLED Theme -->
|
||||
<color name="accent_amoled">#3399FF</color>
|
||||
<color name="divider_amoled">@android:color/transparent</color>
|
||||
<color name="surface_amoled">@color/md_black_1000</color>
|
||||
<color name="background_amoled">@color/md_black_1000</color>
|
||||
<color name="ripple_colored_amoled">#1F3399FF</color>
|
||||
|
||||
<!-- Hot Pink Theme -->
|
||||
<color name="accent_hotpink">#FF3399</color>
|
||||
<color name="ripple_colored_hotpink">#1FFF3399</color>
|
||||
|
||||
<!-- Reader Theme -->
|
||||
<color name="reader_toolbar">#242529</color>
|
||||
|
@ -27,7 +27,7 @@
|
||||
<item name="android:listDivider">@drawable/line_divider</item>
|
||||
|
||||
<!-- Ripples -->
|
||||
<item name="colorControlHighlight">@color/ripple_colored</item>
|
||||
<item name="colorControlHighlight">@color/ripple_colored_light</item>
|
||||
<item name="rippleColorToolbar">?attr/colorControlHighlight</item>
|
||||
|
||||
<!-- Handles RTL text -->
|
||||
@ -58,6 +58,7 @@
|
||||
<item name="toolbarStyle">@style/Widget.MaterialComponents.Toolbar.Surface</item>
|
||||
<item name="tabStyle">@style/Widget.Tachiyomi.TabLayout</item>
|
||||
<item name="bottomNavigationStyle">@style/Widget.MaterialComponents.BottomNavigationView</item>
|
||||
<item name="navigationRailStyle">@style/Widget.MaterialComponents.NavigationRailView</item>
|
||||
|
||||
<!-- Text Appearances -->
|
||||
<item name="textAppearanceButton">@style/TextAppearance.Widget.Button</item>
|
||||
@ -110,7 +111,7 @@
|
||||
<item name="toolbarStyle">@style/Widget.Tachiyomi.Toolbar.Primary</item>
|
||||
<item name="tabStyle">@style/Widget.Tachiyomi.TabLayout.Colored</item>
|
||||
<item name="bottomNavigationStyle">@style/Widget.MaterialComponents.BottomNavigationView.Colored</item>
|
||||
|
||||
<item name="navigationRailStyle">@style/Widget.MaterialComponents.NavigationRailView.Colored</item>
|
||||
|
||||
<!-- Status/Navigation bar -->
|
||||
<item name="android:windowLightStatusBar" tools:targetApi="m">false</item>
|
||||
@ -124,6 +125,7 @@
|
||||
<!-- Theme colors -->
|
||||
<item name="colorPrimary">@color/accent_strawberry</item>
|
||||
<item name="colorTertiary">@color/md_blue_A400</item>
|
||||
<item name="colorControlHighlight">@color/ripple_colored_strawberry</item>
|
||||
</style>
|
||||
|
||||
<!--== Yotsuba theme ==-->
|
||||
@ -131,6 +133,7 @@
|
||||
<!-- Theme colors -->
|
||||
<item name="colorPrimary">@color/accent_yotsuba</item>
|
||||
<item name="colorTertiary">@color/md_blue_A400</item>
|
||||
<item name="colorControlHighlight">@color/ripple_colored_yotsuba</item>
|
||||
</style>
|
||||
|
||||
<!--=============-->
|
||||
@ -159,7 +162,7 @@
|
||||
<item name="android:listDivider">@drawable/line_divider</item>
|
||||
|
||||
<!-- Ripples -->
|
||||
<item name="colorControlHighlight">@color/ripple_colored</item>
|
||||
<item name="colorControlHighlight">@color/ripple_colored_dark</item>
|
||||
<item name="rippleColorToolbar">?attr/colorControlHighlight</item>
|
||||
|
||||
<!-- Handles RTL text -->
|
||||
@ -190,6 +193,7 @@
|
||||
<item name="toolbarStyle">@style/Widget.MaterialComponents.Toolbar.Surface</item>
|
||||
<item name="tabStyle">@style/Widget.Tachiyomi.TabLayout</item>
|
||||
<item name="bottomNavigationStyle">@style/Widget.MaterialComponents.BottomNavigationView</item>
|
||||
<item name="navigationRailStyle">@style/Widget.MaterialComponents.NavigationRailView</item>
|
||||
<item name="elevationOverlayEnabled">false</item>
|
||||
|
||||
<!-- Text Appearances -->
|
||||
@ -231,6 +235,7 @@
|
||||
<item name="toolbarStyle">@style/Widget.Tachiyomi.Toolbar.Primary</item>
|
||||
<item name="tabStyle">@style/Widget.Tachiyomi.TabLayout.Colored</item>
|
||||
<item name="bottomNavigationStyle">@style/Widget.MaterialComponents.BottomNavigationView.Colored</item>
|
||||
<item name="navigationRailStyle">@style/Widget.MaterialComponents.NavigationRailView.Colored</item>
|
||||
|
||||
<!-- Status/Navigation bar -->
|
||||
<item name="android:statusBarColor">?attr/colorPrimary</item>
|
||||
@ -243,6 +248,7 @@
|
||||
<item name="colorPrimary">@color/accent_greenapple</item>
|
||||
<item name="colorOnPrimary">@color/md_black_1000</item>
|
||||
<item name="colorTertiary">@color/md_blue_A400</item>
|
||||
<item name="colorControlHighlight">@color/ripple_colored_greenapple</item>
|
||||
</style>
|
||||
|
||||
<!--== Midnight Dusk theme ==-->
|
||||
@ -251,9 +257,8 @@
|
||||
<item name="colorPrimary">@color/accent_midnightdusk</item>
|
||||
<item name="colorTertiary">@color/md_blue_A400</item>
|
||||
<item name="colorSurface">@color/surface_midnightdusk</item>
|
||||
|
||||
<!-- Base background/text colors -->
|
||||
<item name="android:colorBackground">@color/background_midnightdusk</item>
|
||||
<item name="colorControlHighlight">@color/ripple_colored_midnightdusk</item>
|
||||
</style>
|
||||
|
||||
<!--===============-->
|
||||
@ -282,7 +287,7 @@
|
||||
<item name="android:listDivider">@drawable/line_divider</item>
|
||||
|
||||
<!-- Ripples -->
|
||||
<item name="colorControlHighlight">@color/ripple_colored</item>
|
||||
<item name="colorControlHighlight">@color/ripple_colored_amoled</item>
|
||||
<item name="rippleColorToolbar">?attr/colorControlHighlight</item>
|
||||
|
||||
<!-- Handles RTL text -->
|
||||
@ -312,6 +317,7 @@
|
||||
<item name="toolbarStyle">@style/Widget.MaterialComponents.Toolbar.Surface</item>
|
||||
<item name="tabStyle">@style/Widget.Tachiyomi.TabLayout</item>
|
||||
<item name="bottomNavigationStyle">@style/Widget.MaterialComponents.BottomNavigationView</item>
|
||||
<item name="navigationRailStyle">@style/Widget.MaterialComponents.NavigationRailView</item>
|
||||
<item name="elevationOverlayEnabled">false</item>
|
||||
|
||||
<!-- Some ROMs make black navbars white (e.g. OxygenOS) -->
|
||||
@ -340,6 +346,7 @@
|
||||
<!-- Theme colors -->
|
||||
<item name="colorPrimary">@color/accent_hotpink</item>
|
||||
<item name="colorTertiary">@color/md_blue_A400</item>
|
||||
<item name="colorControlHighlight">@color/ripple_colored_hotpink</item>
|
||||
</style>
|
||||
|
||||
<!--===============-->
|
||||
|
Loading…
Reference in New Issue
Block a user