From 2833691c34c48daf5bc7d09d7e0f076e9c718da7 Mon Sep 17 00:00:00 2001 From: seven332 Date: Thu, 25 Oct 2018 13:37:25 +0800 Subject: [PATCH] Adjust text color --- .../hippo/ehviewer/ui/GalleryActivity.java | 2 +- .../color/preference_header_title_light.xml | 24 ------------------- app/src/main/res/color/primary_text_dark.xml | 21 ---------------- app/src/main/res/color/primary_text_light.xml | 21 ---------------- .../main/res/color/secondary_text_dark.xml | 21 ---------------- .../main/res/color/secondary_text_light.xml | 21 ---------------- app/src/main/res/layout/activity_gallery.xml | 6 ++--- .../main/res/layout/dialog_gallery_menu.xml | 24 +++++++++---------- .../main/res/layout/gallery_detail_header.xml | 2 +- app/src/main/res/values/attrs.xml | 1 + app/src/main/res/values/colors.xml | 15 ++++-------- app/src/main/res/values/themes.xml | 9 ++++--- 12 files changed, 28 insertions(+), 139 deletions(-) delete mode 100644 app/src/main/res/color/preference_header_title_light.xml delete mode 100644 app/src/main/res/color/primary_text_dark.xml delete mode 100644 app/src/main/res/color/primary_text_light.xml delete mode 100644 app/src/main/res/color/secondary_text_dark.xml delete mode 100644 app/src/main/res/color/secondary_text_light.xml diff --git a/app/src/main/java/com/hippo/ehviewer/ui/GalleryActivity.java b/app/src/main/java/com/hippo/ehviewer/ui/GalleryActivity.java index 07f061bce..94f2a907d 100644 --- a/app/src/main/java/com/hippo/ehviewer/ui/GalleryActivity.java +++ b/app/src/main/java/com/hippo/ehviewer/ui/GalleryActivity.java @@ -310,7 +310,7 @@ public class GalleryActivity extends EhActivity implements SeekBar.OnSeekBarChan .setPageInfoInterval(resources.getDimensionPixelOffset(R.dimen.gallery_page_info_interval)) .setProgressColor(primaryColor) .setProgressSize(resources.getDimensionPixelOffset(R.dimen.gallery_progress_size)) - .setPageTextColor(resources.getColor(R.color.secondary_text_default_dark)) + .setPageTextColor(AttrResources.getAttrColor(this, android.R.attr.textColorSecondary)) .setPageTextSize(resources.getDimensionPixelOffset(R.dimen.gallery_page_text_size)) .setPageTextTypeface(Typeface.DEFAULT) .setErrorTextColor(resources.getColor(R.color.red_500)) diff --git a/app/src/main/res/color/preference_header_title_light.xml b/app/src/main/res/color/preference_header_title_light.xml deleted file mode 100644 index 4f7807db5..000000000 --- a/app/src/main/res/color/preference_header_title_light.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - diff --git a/app/src/main/res/color/primary_text_dark.xml b/app/src/main/res/color/primary_text_dark.xml deleted file mode 100644 index b225c17d6..000000000 --- a/app/src/main/res/color/primary_text_dark.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - diff --git a/app/src/main/res/color/primary_text_light.xml b/app/src/main/res/color/primary_text_light.xml deleted file mode 100644 index 6dc9eb3c1..000000000 --- a/app/src/main/res/color/primary_text_light.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - diff --git a/app/src/main/res/color/secondary_text_dark.xml b/app/src/main/res/color/secondary_text_dark.xml deleted file mode 100644 index fd8b3f636..000000000 --- a/app/src/main/res/color/secondary_text_dark.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - diff --git a/app/src/main/res/color/secondary_text_light.xml b/app/src/main/res/color/secondary_text_light.xml deleted file mode 100644 index 67b0b4e3e..000000000 --- a/app/src/main/res/color/secondary_text_light.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - diff --git a/app/src/main/res/layout/activity_gallery.xml b/app/src/main/res/layout/activity_gallery.xml index b77ede285..a4211f372 100644 --- a/app/src/main/res/layout/activity_gallery.xml +++ b/app/src/main/res/layout/activity_gallery.xml @@ -33,7 +33,7 @@ android:layout_gravity="right" android:layout_marginTop="@dimen/gallery_widget_margin_v" android:layout_marginRight="@dimen/gallery_widget_margin_h" - android:textColor="@color/secondary_text_dark"/> + android:textColor="?android:attr/textColorSecondary"/> + android:textColor="?android:attr/textColorSecondary"/> + android:textColor="?android:attr/textColorPrimary"/> + android:textColor="?android:attr/textColorPrimary"/> + android:textColor="?android:attr/textColorPrimary"/> + android:textColor="?android:attr/textColorPrimary"/> + android:textColor="?android:attr/textColorPrimary"/> + android:textColor="?android:attr/textColorPrimary"/> + android:textColor="?android:attr/textColorPrimary"/> + android:textColor="?android:attr/textColorPrimary"/> + android:textColor="?android:attr/textColorPrimary"/> + android:textColor="?android:attr/textColorPrimary"/> + android:textColor="?android:attr/textColorPrimary"/> + android:textColor="?android:attr/textColorPrimary"/> diff --git a/app/src/main/res/values/attrs.xml b/app/src/main/res/values/attrs.xml index 018c74895..c037617e0 100644 --- a/app/src/main/res/values/attrs.xml +++ b/app/src/main/res/values/attrs.xml @@ -55,6 +55,7 @@ + diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index e2a3bb064..8b28c0e9a 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -21,21 +21,14 @@ + + #8a000000 #42000000 #ffffffff #4dffffff - - - #de000000 - #ffffffff - #4dffffff - #8a000000 - #36ffffff - #deffffff - #39000000 - #61ffffff - #24000000 + #ccffffff + #3dffffff #ff303030 #fffafafa diff --git a/app/src/main/res/values/themes.xml b/app/src/main/res/values/themes.xml index 252d6ffbe..4c8d69dc2 100644 --- a/app/src/main/res/values/themes.xml +++ b/app/src/main/res/values/themes.xml @@ -45,6 +45,7 @@ ?android:attr/textColorSecondaryInverse @color/tag_group_background_light @color/tag_background_light + ?android:attr/textColorPrimaryInverse ?attr/contentColorThemePrimary @color/gallery_detail_button_background_light @@ -88,6 +89,7 @@ ?android:attr/textColorSecondary @color/tag_group_background_dark @color/tag_background_dark + ?android:attr/textColorPrimary ?attr/contentColorThemePrimary @color/gallery_detail_button_background_dark @@ -120,9 +122,9 @@ @android:color/black ?android:attr/textColorSecondary ?android:attr/textColorSecondary - @color/primary_drawable_dark - @color/secondary_drawable_dark - @color/primary_drawable_dark + @color/primary_drawable_black + @color/secondary_drawable_black + @color/primary_drawable_black @color/content_black ?attr/contentColorPrimary ?attr/contentColorPrimary @@ -135,6 +137,7 @@ ?android:attr/textColorSecondary @color/tag_group_background_black @color/tag_background_black + ?android:attr/textColorPrimary @android:color/black @color/gallery_detail_button_background_black