From 21184348239cd368d50daa7a00b212fd60ebc2c9 Mon Sep 17 00:00:00 2001 From: Bram van de Kerkhof Date: Sun, 7 May 2017 12:36:25 +0200 Subject: [PATCH] Initial AMOLED theme + some CardView fixes (#787) * Initial AMOLED theme + some CardView fixes * small fix --- .../ui/base/activity/ActivityMixin.kt | 1 + .../library_item_selector_amoled.xml | 23 +++++++++++++++++++ .../list_item_selector_amoled.xml | 19 +++++++++++++++ .../drawable/library_item_selector_amoled.xml | 10 ++++++++ .../drawable/list_item_selector_amoled.xml | 10 ++++++++ .../res/layout/fragment_recently_read.xml | 4 ++++ .../main/res/layout/item_recently_read.xml | 1 - app/src/main/res/values-v21/themes.xml | 9 ++++++++ app/src/main/res/values/arrays.xml | 2 ++ app/src/main/res/values/strings.xml | 1 + app/src/main/res/values/styles.xml | 9 ++++---- app/src/main/res/values/themes.xml | 16 +++++++++++++ 12 files changed, 100 insertions(+), 5 deletions(-) create mode 100644 app/src/main/res/drawable-v21/library_item_selector_amoled.xml create mode 100644 app/src/main/res/drawable-v21/list_item_selector_amoled.xml create mode 100644 app/src/main/res/drawable/library_item_selector_amoled.xml create mode 100644 app/src/main/res/drawable/list_item_selector_amoled.xml diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/base/activity/ActivityMixin.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/base/activity/ActivityMixin.kt index ea1da77e92..947f32d184 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/base/activity/ActivityMixin.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/base/activity/ActivityMixin.kt @@ -32,6 +32,7 @@ interface ActivityMixin { fun setAppTheme() { setTheme(when (Injekt.get().theme()) { 2 -> R.style.Theme_Tachiyomi_Dark + 3 -> R.style.Theme_Tachiyomi_Amoled else -> R.style.Theme_Tachiyomi }) } diff --git a/app/src/main/res/drawable-v21/library_item_selector_amoled.xml b/app/src/main/res/drawable-v21/library_item_selector_amoled.xml new file mode 100644 index 0000000000..4ad2729afe --- /dev/null +++ b/app/src/main/res/drawable-v21/library_item_selector_amoled.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/drawable-v21/list_item_selector_amoled.xml b/app/src/main/res/drawable-v21/list_item_selector_amoled.xml new file mode 100644 index 0000000000..96494d93ab --- /dev/null +++ b/app/src/main/res/drawable-v21/list_item_selector_amoled.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/library_item_selector_amoled.xml b/app/src/main/res/drawable/library_item_selector_amoled.xml new file mode 100644 index 0000000000..92cb0db941 --- /dev/null +++ b/app/src/main/res/drawable/library_item_selector_amoled.xml @@ -0,0 +1,10 @@ + + + + + + + + + diff --git a/app/src/main/res/drawable/list_item_selector_amoled.xml b/app/src/main/res/drawable/list_item_selector_amoled.xml new file mode 100644 index 0000000000..e573c82bb5 --- /dev/null +++ b/app/src/main/res/drawable/list_item_selector_amoled.xml @@ -0,0 +1,10 @@ + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_recently_read.xml b/app/src/main/res/layout/fragment_recently_read.xml index 6ee45a322d..da0200c18d 100644 --- a/app/src/main/res/layout/fragment_recently_read.xml +++ b/app/src/main/res/layout/fragment_recently_read.xml @@ -9,6 +9,10 @@ android:id="@+id/recycler" android:layout_width="match_parent" android:layout_height="match_parent" + android:paddingBottom="4dp" + android:paddingTop="4dp" + android:paddingStart="2dp" + android:paddingEnd="2dp" tools:listitem="@layout/item_recently_read"> diff --git a/app/src/main/res/layout/item_recently_read.xml b/app/src/main/res/layout/item_recently_read.xml index 7222b234ef..ac0c1e0a2e 100644 --- a/app/src/main/res/layout/item_recently_read.xml +++ b/app/src/main/res/layout/item_recently_read.xml @@ -3,7 +3,6 @@ xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/cv_manga" style="@style/Theme.Widget.CardView" - android:layout_marginBottom="0dp" > @color/colorPrimaryDark + + + + + diff --git a/app/src/main/res/values/arrays.xml b/app/src/main/res/values/arrays.xml index e01f29ba06..c98f378880 100644 --- a/app/src/main/res/values/arrays.xml +++ b/app/src/main/res/values/arrays.xml @@ -25,11 +25,13 @@ 1 2 + 3 @string/light_theme @string/dark_theme + @string/amoled_theme diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 9fed481594..1864327fed 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -131,6 +131,7 @@ Application theme Main theme Dark theme + AMOLED theme Start screen Language System default diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml index 23c7364dd3..a77a7ce1a3 100644 --- a/app/src/main/res/values/styles.xml +++ b/app/src/main/res/values/styles.xml @@ -147,10 +147,11 @@ match_parent wrap_content ?attr/background_card - @dimen/card_margin - @dimen/card_margin - @dimen/card_margin - @dimen/card_margin + 3dp + true + 2dp + 2dp + 2dp + + + + + + +