From 012736bff62005c8c61f5844529fc5216af1e885 Mon Sep 17 00:00:00 2001 From: Alex Ning Date: Thu, 19 Mar 2020 12:20:23 +0800 Subject: Start implementing custom theme settings. --- .../ic_dark_theme_preference_24dp.xml | 9 ++ .../ic_light_theme_preference_24dp.xml | 9 ++ app/src/main/res/drawable/circular_background.xml | 4 + .../res/drawable/ic_dark_theme_preference_24dp.xml | 9 ++ .../drawable/ic_light_theme_preference_24dp.xml | 9 ++ .../main/res/layout/activity_customize_theme.xml | 41 ++++++ app/src/main/res/layout/activity_settings.xml | 1 - app/src/main/res/layout/item_theme_color_item.xml | 33 +++++ app/src/main/res/layout/item_theme_switch_item.xml | 32 +++++ app/src/main/res/values/strings.xml | 140 ++++++++++++++++++++- app/src/main/res/xml/theme_preferences.xml | 18 +++ 11 files changed, 302 insertions(+), 3 deletions(-) create mode 100644 app/src/main/res/drawable-night/ic_dark_theme_preference_24dp.xml create mode 100644 app/src/main/res/drawable-night/ic_light_theme_preference_24dp.xml create mode 100644 app/src/main/res/drawable/circular_background.xml create mode 100644 app/src/main/res/drawable/ic_dark_theme_preference_24dp.xml create mode 100644 app/src/main/res/drawable/ic_light_theme_preference_24dp.xml create mode 100644 app/src/main/res/layout/activity_customize_theme.xml create mode 100644 app/src/main/res/layout/item_theme_color_item.xml create mode 100644 app/src/main/res/layout/item_theme_switch_item.xml (limited to 'app/src/main/res') diff --git a/app/src/main/res/drawable-night/ic_dark_theme_preference_24dp.xml b/app/src/main/res/drawable-night/ic_dark_theme_preference_24dp.xml new file mode 100644 index 00000000..3ea2743e --- /dev/null +++ b/app/src/main/res/drawable-night/ic_dark_theme_preference_24dp.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable-night/ic_light_theme_preference_24dp.xml b/app/src/main/res/drawable-night/ic_light_theme_preference_24dp.xml new file mode 100644 index 00000000..8a7d0fe8 --- /dev/null +++ b/app/src/main/res/drawable-night/ic_light_theme_preference_24dp.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable/circular_background.xml b/app/src/main/res/drawable/circular_background.xml new file mode 100644 index 00000000..5f6c58ee --- /dev/null +++ b/app/src/main/res/drawable/circular_background.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/ic_dark_theme_preference_24dp.xml b/app/src/main/res/drawable/ic_dark_theme_preference_24dp.xml new file mode 100644 index 00000000..24ef45dd --- /dev/null +++ b/app/src/main/res/drawable/ic_dark_theme_preference_24dp.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable/ic_light_theme_preference_24dp.xml b/app/src/main/res/drawable/ic_light_theme_preference_24dp.xml new file mode 100644 index 00000000..5eb72292 --- /dev/null +++ b/app/src/main/res/drawable/ic_light_theme_preference_24dp.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/layout/activity_customize_theme.xml b/app/src/main/res/layout/activity_customize_theme.xml new file mode 100644 index 00000000..362772a1 --- /dev/null +++ b/app/src/main/res/layout/activity_customize_theme.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/activity_settings.xml b/app/src/main/res/layout/activity_settings.xml index 50dd0290..7e10c9ad 100644 --- a/app/src/main/res/layout/activity_settings.xml +++ b/app/src/main/res/layout/activity_settings.xml @@ -2,7 +2,6 @@ xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent" - android:id="@+id/coordinator_layout_settings_activity" android:background="?attr/backgroundColor"> + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/item_theme_switch_item.xml b/app/src/main/res/layout/item_theme_switch_item.xml new file mode 100644 index 00000000..4b337fc8 --- /dev/null +++ b/app/src/main/res/layout/item_theme_switch_item.xml @@ -0,0 +1,32 @@ + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 45f7b7e5..158495c7 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -357,6 +357,10 @@ r/Infinity_For_Reddit Share Share this app to other people if you enjoy it + Customization + Light Theme + Dark Theme + Amoled Theme Cannot get the link @@ -460,6 +464,138 @@ Saving the image. Please wait. Saving the gif. Please wait. - - Hello blank fragment + Customize Light Theme + Customize Dark Theme + Customize Amoled Theme + + Color Primary + Applied to: Toolbar + Color Primary Dark + Applied to: Status Bar + Color Accent + Applied to: Progress Bar, etc + Color Primary Light Theme + Has effect only when this theme is set as light theme.\nApplied to: background of Floating Action Button and Button + Primary Text Color + Applied to: Primary text + Secondary Text Color + Applied to: Secondary text + Post Title Color + Applied to: Post title + Post Content Color + Applied to: Post content + Comment Color + Applied to: Comment + Button Text Color + Applied to: Text on button + Chip Text Color + Applied to: Subscribe Button + Background Color + Applied to: Background of every page and navigation drawer + Card View Background Color + Applied to: Post background and message background + Comment Background Color + Applied to: Comment background + Bottom Navigation Bar Color + Applied to: Bottom navigation bar + Primary Icon Color + Applied to: Icons in the bottom navigation bar and the navigation drawer. + Post Icon and Info Color + Applied to: Icons, score and the number of comments in posts + Comment Icon and Info Color + Applied to: Icons and score in comments + Floating Action Button Icon Color + Applied to: Floating action button icon + Toolbar Primary Text and Icon Color + Applied to: Primary texts and icons in toolbars + Toolbar Secondary Text Color + Applied to: Secondary texts in toolbars + Circular Progress Bar Background Color + Applied to: Background of Circular progress bar + Background Color of Tab Layout in Expanded Toolbar + Applied to: Tab layout background (expanded toolbar) + Text Color of Tab Layout in Expanded Toolbar + Applied to: Tab layout text color (expanded toolbar) + Tab Indicator Color of Tab Layout in Expanded Toolbar + Applied to: Tab indicator color in tab layout (expanded toolbar) + Background Color of Tab Layout in Collapsed Toolbar + Applied to: Tab layout background (collapsed toolbar) + Text Color of Tab Layout in Collapsed Toolbar + Applied to: Tab layout text color (collapsed toolbar) + Tab Indicator Color of Tab Layout in Collapsed Toolbar + Applied to: Tab indicator color in tab layout (collapsed toolbar) + Upvoted Color + Applied to: Vote buttons and scores (upvoted) + Downvoted Color + Applied to: Vote buttons and scores (downvoted) + Post Type Background Color + Applied to: Background of the post type (IMAGE, TEXT, VIDEO, GIF, LINK) + Post Type Text Color + Applied to: Text color of the post type (IMAGE, TEXT, VIDEO, GIF LINK) + Spoiler Background Color + Applied to: Background of the spoiler tag + Spoiler Text Color + Applied to: Text color in the spoiler tag + NSFW Background Color + Applied to: Background of the NSFW tag + NSFW text color + Applied to: Text color of the NSFW tag + Flair Background Color + Applied to: Background of the flair tag + Flair Text Color + Applied to: Text color of the flair tag + Archived Icon Color + Applied to: Archived icon + Locked Icon Color + Applied to: Locked icon + Crosspost Icon Color + Applied to: Crosspost icon + Stickied Post Icon Color + Applied to: Stickied post icon + Subscribed + Applied to: Unsubscribe button + Unsubscribed + Applied to: Sbscribe button + Username Color + Applied to: Username + Subreddit Color + Applied to: Subreddit name + Author Flair Color + Applied to: Author flair in comments + Submitter + Applied to: Submitter in comments + Moderator + Applied to: Moderator in comments + Single Comment Thread Background Color + Applied to: Single Comment + Unread Message Background Color + Applied to: Unread Message Background Color + Divider Color + Applied to: Comment divider, dividers in pages for submitting posts, etc. + No-Preview Link Background Color + Applied to: No-preview link placeholder + Vote and Reply Unavailable Button Color + Applied to: Vote and reply buttons (Unavailable) + Comment Vertical Bar Color 1 + Applied to: Comment Vertical Bar (Level 1) + Comment Vertical Bar Color 2 + Applied to: Comment Vertical Bar (Level 2) + Comment Vertical Bar Color 3 + Applied to: Comment Vertical Bar (Level 3) + Comment Vertical Bar Color 4 + Applied to: Comment Vertical Bar (Level 4) + Comment Vertical Bar Color 5 + Applied to: Comment Vertical Bar (Level 5) + Comment Vertical Bar Color 6 + Applied to: Comment Vertical Bar (Level 6) + Comment Vertical Bar Color 7 + Applied to: Comment Vertical Bar (Level 7) + Navigation Bar Color + Applied to: Navigation bar + Dark Status Bar Icon Color + Dark Navigation Bar Icon Color + Change Status Bar Icon Color After Toolbar Collapsed In Immersive Interface + Only available for Android 8.0 or above. + Only available for Android 6.0 or above. + diff --git a/app/src/main/res/xml/theme_preferences.xml b/app/src/main/res/xml/theme_preferences.xml index 038485e0..e7d9c13f 100644 --- a/app/src/main/res/xml/theme_preferences.xml +++ b/app/src/main/res/xml/theme_preferences.xml @@ -15,4 +15,22 @@ app:key="amoled_dark" app:title="@string/settings_amoled_dark_title" /> + + + + + + + + \ No newline at end of file -- cgit v1.2.3