aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/res
diff options
context:
space:
mode:
authorAlex Ning <chineseperson5@gmail.com>2020-03-26 16:30:05 +0000
committerAlex Ning <chineseperson5@gmail.com>2020-03-26 16:30:05 +0000
commit3dca261deaa2674b1faca52fec213f6cc960a61f (patch)
treea8dfbfe0c1503014ef66ee01d31d383073041a98 /app/src/main/res
parent0694c471c4ba39fa8235e1ecfcc4e8e40ad13ad2 (diff)
downloadinfinity-for-reddit-3dca261deaa2674b1faca52fec213f6cc960a61f.tar
infinity-for-reddit-3dca261deaa2674b1faca52fec213f6cc960a61f.tar.gz
infinity-for-reddit-3dca261deaa2674b1faca52fec213f6cc960a61f.tar.bz2
infinity-for-reddit-3dca261deaa2674b1faca52fec213f6cc960a61f.tar.lz
infinity-for-reddit-3dca261deaa2674b1faca52fec213f6cc960a61f.tar.xz
infinity-for-reddit-3dca261deaa2674b1faca52fec213f6cc960a61f.tar.zst
infinity-for-reddit-3dca261deaa2674b1faca52fec213f6cc960a61f.zip
Still implementing custom themes.
Diffstat (limited to 'app/src/main/res')
-rw-r--r--app/src/main/res/drawable-night/ic_amoled_theme_preference_24dp.xml9
-rw-r--r--app/src/main/res/drawable/ic_amoled_theme_preference_24dp.xml9
-rw-r--r--app/src/main/res/layout/activity_custom_theme_listing.xml10
-rw-r--r--app/src/main/res/layout/activity_customize_theme.xml1
-rw-r--r--app/src/main/res/layout/dialog_edit_theme_name.xml10
-rw-r--r--app/src/main/res/layout/fragment_custom_theme_options_bottom_sheet.xml97
-rw-r--r--app/src/main/res/layout/fragment_select_base_theme_bottom_sheet.xml81
-rw-r--r--app/src/main/res/layout/item_predefined_custom_theme.xml11
-rw-r--r--app/src/main/res/layout/item_user_custom_theme.xml4
-rw-r--r--app/src/main/res/values/strings.xml14
-rw-r--r--app/src/main/res/xml/theme_preferences.xml11
11 files changed, 249 insertions, 8 deletions
diff --git a/app/src/main/res/drawable-night/ic_amoled_theme_preference_24dp.xml b/app/src/main/res/drawable-night/ic_amoled_theme_preference_24dp.xml
new file mode 100644
index 00000000..3eb4a608
--- /dev/null
+++ b/app/src/main/res/drawable-night/ic_amoled_theme_preference_24dp.xml
@@ -0,0 +1,9 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
+ <path
+ android:fillColor="#FFFFFFFF"
+ android:pathData="M3,5A2,2 0,0 1,5 3H19A2,2 0,0 1,21 5V19A2,2 0,0 1,19 21H5C3.89,21 3,20.1 3,19V5M5,5V19H19V5H5M11,7H13A2,2 0,0 1,15 9V17H13V13H11V17H9V9A2,2 0,0 1,11 7M11,9V11H13V9H11Z"/>
+</vector>
diff --git a/app/src/main/res/drawable/ic_amoled_theme_preference_24dp.xml b/app/src/main/res/drawable/ic_amoled_theme_preference_24dp.xml
new file mode 100644
index 00000000..1389a13e
--- /dev/null
+++ b/app/src/main/res/drawable/ic_amoled_theme_preference_24dp.xml
@@ -0,0 +1,9 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
+ <path
+ android:fillColor="#FF000000"
+ android:pathData="M3,5A2,2 0,0 1,5 3H19A2,2 0,0 1,21 5V19A2,2 0,0 1,19 21H5C3.89,21 3,20.1 3,19V5M5,5V19H19V5H5M11,7H13A2,2 0,0 1,15 9V17H13V13H11V17H9V9A2,2 0,0 1,11 7M11,9V11H13V9H11Z"/>
+</vector>
diff --git a/app/src/main/res/layout/activity_custom_theme_listing.xml b/app/src/main/res/layout/activity_custom_theme_listing.xml
index f128c11c..260453e6 100644
--- a/app/src/main/res/layout/activity_custom_theme_listing.xml
+++ b/app/src/main/res/layout/activity_custom_theme_listing.xml
@@ -38,4 +38,14 @@
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
+ <com.google.android.material.floatingactionbutton.FloatingActionButton
+ android:id="@+id/fab_custom_theme_listing_activity"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_margin="@dimen/fab_margin"
+ android:layout_gravity="bottom|end"
+ app:backgroundTint="?attr/colorPrimaryLightTheme"
+ app:srcCompat="@drawable/ic_add_bottom_app_bar_24dp"
+ app:tint="@android:color/white" />
+
</androidx.coordinatorlayout.widget.CoordinatorLayout> \ No newline at end of file
diff --git a/app/src/main/res/layout/activity_customize_theme.xml b/app/src/main/res/layout/activity_customize_theme.xml
index 362772a1..90dfa2b8 100644
--- a/app/src/main/res/layout/activity_customize_theme.xml
+++ b/app/src/main/res/layout/activity_customize_theme.xml
@@ -4,6 +4,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
+ android:id="@+id/coordinator_customize_theme_activity"
tools:context=".Activity.CustomizeThemeActivity">
<com.google.android.material.appbar.AppBarLayout
diff --git a/app/src/main/res/layout/dialog_edit_theme_name.xml b/app/src/main/res/layout/dialog_edit_theme_name.xml
new file mode 100644
index 00000000..9a63f486
--- /dev/null
+++ b/app/src/main/res/layout/dialog_edit_theme_name.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<EditText xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/theme_name_edit_text_edit_theme_name_dialog"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:padding="24dp"
+ android:background="#00000000"
+ android:hint="@string/theme_name_hint"
+ android:textColor="?attr/primaryTextColor"
+ android:textSize="?attr/font_default" /> \ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_custom_theme_options_bottom_sheet.xml b/app/src/main/res/layout/fragment_custom_theme_options_bottom_sheet.xml
new file mode 100644
index 00000000..82962293
--- /dev/null
+++ b/app/src/main/res/layout/fragment_custom_theme_options_bottom_sheet.xml
@@ -0,0 +1,97 @@
+<?xml version="1.0" encoding="utf-8"?>
+<androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:paddingBottom="8dp"
+ android:overScrollMode="never">
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical">
+
+ <TextView
+ android:id="@+id/theme_name_text_view_custom_theme_options_bottom_sheet_fragment"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:paddingTop="16dp"
+ android:paddingBottom="16dp"
+ android:paddingStart="32dp"
+ android:paddingEnd="32dp"
+ android:textColor="?attr/primaryTextColor" />
+
+ <TextView
+ android:id="@+id/edit_theme_text_view_custom_theme_options_bottom_sheet_fragment"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:gravity="center_vertical"
+ android:paddingTop="16dp"
+ android:paddingBottom="16dp"
+ android:paddingStart="32dp"
+ android:paddingEnd="32dp"
+ android:text="@string/edit_theme"
+ android:textColor="?attr/primaryTextColor"
+ android:textSize="?attr/font_default"
+ android:drawableStart="@drawable/ic_edit_24dp"
+ android:drawablePadding="48dp"
+ android:clickable="true"
+ android:focusable="true"
+ android:background="?attr/selectableItemBackground" />
+
+ <TextView
+ android:id="@+id/change_theme_name_text_view_custom_theme_options_bottom_sheet_fragment"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:gravity="center_vertical"
+ android:paddingTop="16dp"
+ android:paddingBottom="16dp"
+ android:paddingStart="32dp"
+ android:paddingEnd="32dp"
+ android:text="@string/change_theme_name"
+ android:textColor="?attr/primaryTextColor"
+ android:textSize="?attr/font_default"
+ android:drawableStart="@drawable/ic_edit_24dp"
+ android:drawablePadding="48dp"
+ android:clickable="true"
+ android:focusable="true"
+ android:background="?attr/selectableItemBackground" />
+
+ <TextView
+ android:id="@+id/share_theme_text_view_custom_theme_options_bottom_sheet_fragment"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:gravity="center_vertical"
+ android:paddingTop="16dp"
+ android:paddingBottom="16dp"
+ android:paddingStart="32dp"
+ android:paddingEnd="32dp"
+ android:text="@string/share_theme"
+ android:textColor="?attr/primaryTextColor"
+ android:textSize="?attr/font_default"
+ android:drawableStart="@drawable/ic_share_24dp"
+ android:drawablePadding="48dp"
+ android:clickable="true"
+ android:focusable="true"
+ android:background="?attr/selectableItemBackground" />
+
+ <TextView
+ android:id="@+id/delete_theme_text_view_custom_theme_options_bottom_sheet_fragment"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:gravity="center_vertical"
+ android:paddingTop="16dp"
+ android:paddingBottom="16dp"
+ android:paddingStart="32dp"
+ android:paddingEnd="32dp"
+ android:text="@string/delete_theme"
+ android:textColor="?attr/primaryTextColor"
+ android:textSize="?attr/font_default"
+ android:drawableStart="@drawable/ic_delete_24dp"
+ android:drawablePadding="48dp"
+ android:clickable="true"
+ android:focusable="true"
+ android:background="?attr/selectableItemBackground" />
+
+ </LinearLayout>
+
+</androidx.core.widget.NestedScrollView> \ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_select_base_theme_bottom_sheet.xml b/app/src/main/res/layout/fragment_select_base_theme_bottom_sheet.xml
new file mode 100644
index 00000000..d0adbd83
--- /dev/null
+++ b/app/src/main/res/layout/fragment_select_base_theme_bottom_sheet.xml
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="utf-8"?>
+<androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:paddingBottom="8dp"
+ android:overScrollMode="never">
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical">
+
+ <TextView
+ android:id="@+id/light_theme_text_view_select_base_theme_bottom_sheet_fragment"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:gravity="center_vertical"
+ android:paddingTop="16dp"
+ android:paddingBottom="16dp"
+ android:paddingStart="32dp"
+ android:paddingEnd="32dp"
+ android:text="@string/create_light_theme"
+ android:textColor="?attr/primaryTextColor"
+ android:textSize="?attr/font_default"
+ android:drawableStart="@drawable/ic_light_theme_preference_24dp"
+ android:drawablePadding="48dp"
+ android:clickable="true"
+ android:focusable="true"
+ android:background="?attr/selectableItemBackground" />
+
+ <TextView
+ android:id="@+id/dark_theme_text_view_select_base_theme_bottom_sheet_fragment"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:gravity="center_vertical"
+ android:paddingTop="16dp"
+ android:paddingBottom="16dp"
+ android:paddingStart="32dp"
+ android:paddingEnd="32dp"
+ android:text="@string/create_dark_theme"
+ android:textColor="?attr/primaryTextColor"
+ android:textSize="?attr/font_default"
+ android:drawableStart="@drawable/ic_dark_theme_preference_24dp"
+ android:drawablePadding="48dp"
+ android:clickable="true"
+ android:focusable="true"
+ android:background="?attr/selectableItemBackground" />
+
+ <TextView
+ android:id="@+id/amoled_theme_text_view_select_base_theme_bottom_sheet_fragment"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:gravity="center_vertical"
+ android:paddingTop="16dp"
+ android:paddingBottom="16dp"
+ android:paddingStart="32dp"
+ android:paddingEnd="32dp"
+ android:text="@string/create_amoled_theme"
+ android:textColor="?attr/primaryTextColor"
+ android:textSize="?attr/font_default"
+ android:drawableStart="@drawable/ic_amoled_theme_preference_24dp"
+ android:drawablePadding="48dp"
+ android:clickable="true"
+ android:focusable="true"
+ android:background="?attr/selectableItemBackground" />
+
+ <TextView
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:gravity="center_vertical"
+ android:paddingTop="16dp"
+ android:paddingBottom="16dp"
+ android:paddingStart="32dp"
+ android:paddingEnd="32dp"
+ android:text="@string/create_theme_info"
+ android:textColor="?attr/secondaryTextColor"
+ android:textSize="?attr/font_default" />
+
+ </LinearLayout>
+
+</androidx.core.widget.NestedScrollView> \ No newline at end of file
diff --git a/app/src/main/res/layout/item_predefined_custom_theme.xml b/app/src/main/res/layout/item_predefined_custom_theme.xml
index 432628b1..cbc6bb20 100644
--- a/app/src/main/res/layout/item_predefined_custom_theme.xml
+++ b/app/src/main/res/layout/item_predefined_custom_theme.xml
@@ -16,10 +16,19 @@
<TextView
android:id="@+id/name_text_view_item_predefined_custom_theme"
- android:layout_width="wrap_content"
+ android:layout_width="0dp"
android:layout_height="wrap_content"
+ android:layout_weight="1"
android:layout_marginStart="32dp"
android:layout_gravity="center_vertical"
android:textColor="?attr/primaryTextColor" />
+ <ImageView
+ android:id="@+id/add_image_view_item_predefined_custom_theme"
+ android:layout_width="24dp"
+ android:layout_height="24dp"
+ android:layout_gravity="center_vertical"
+ android:layout_marginStart="32dp"
+ android:src="@drawable/ic_add_24dp" />
+
</LinearLayout> \ No newline at end of file
diff --git a/app/src/main/res/layout/item_user_custom_theme.xml b/app/src/main/res/layout/item_user_custom_theme.xml
index fe610557..e4ea128d 100644
--- a/app/src/main/res/layout/item_user_custom_theme.xml
+++ b/app/src/main/res/layout/item_user_custom_theme.xml
@@ -24,12 +24,12 @@
android:textColor="?attr/primaryTextColor" />
<ImageView
- android:id="@+id/delete_image_view_item_user_custom_theme"
+ android:id="@+id/add_image_view_item_user_custom_theme"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_gravity="center_vertical"
android:layout_marginStart="32dp"
- android:src="@drawable/ic_delete_24dp"
+ android:src="@drawable/ic_add_24dp"
android:background="?attr/selectableItemBackgroundBorderless" />
<ImageView
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 56a0e264..57e85a64 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -20,6 +20,8 @@
<string name="create_multi_reddit_activity_label">Create Multireddit</string>
<string name="subreddit_multiselection_activity_label">Select Subreddits</string>
<string name="custom_theme_listing_activity_label">Custom Themes</string>
+ <string name="customize_theme_activity_label">Customize Theme</string>
+ <string name="customize_theme_activity_create_theme_label">Create Theme</string>
<string name="navigation_drawer_open">Open navigation drawer</string>
<string name="navigation_drawer_close">Close navigation drawer</string>
@@ -468,7 +470,6 @@
<string name="save_gif_before_sharing">Saving the gif. Please wait.</string>
<string name="theme_name_description">Tap to change the name of this theme.</string>
- <string name="theme_name_forbid_change_description">You cannot change the name of this predefined theme.</string>
<string name="theme_item_is_light_theme">Set as Light Theme</string>
<string name="theme_item_is_dark_theme">Set as Dark Theme</string>
<string name="theme_item_is_amoled_theme">Set as Amoled Theme</string>
@@ -604,9 +605,20 @@
<string name="predefined_themes">Predefined Themes</string>
<string name="user_themes">Your Themes</string>
+ <string name="no_theme_name">What is the name of this theme?</string>
+ <string name="theme_name_hint">Theme Name</string>
<string name="theme_name_indigo">Indigo</string>
<string name="theme_name_indigo_dark">Indigo Dark</string>
<string name="theme_name_indigo_amoled">Indigo Amoled</string>
+ <string name="create_light_theme">Create a Light Theme\nBase on Indigo Theme</string>
+ <string name="create_dark_theme">Create a Dark Theme\nBase on Indigo Dark Theme</string>
+ <string name="create_amoled_theme">Create an Amoled Theme\nBase on Indigo Amoled Theme</string>
+ <string name="create_theme_info">If you want to create a theme based on another theme, click the \"+\" button on a theme instead.</string>
+ <string name="edit_theme_name">Edit Theme Name</string>
+ <string name="edit_theme">Edit Theme</string>
+ <string name="delete_theme">Delete Theme</string>
+ <string name="share_theme">Share Theme</string>
+ <string name="change_theme_name">Change Name</string>
<string name="color_picker">Color Picker</string>
<string name="invalid_color">Invalid Color</string>
diff --git a/app/src/main/res/xml/theme_preferences.xml b/app/src/main/res/xml/theme_preferences.xml
index e6aec71f..f40ef592 100644
--- a/app/src/main/res/xml/theme_preferences.xml
+++ b/app/src/main/res/xml/theme_preferences.xml
@@ -21,17 +21,20 @@
<Preference
app:key="customize_light_theme"
app:icon="@drawable/ic_light_theme_preference_24dp"
- app:title="@string/settings_customize_light_theme_title" />
+ app:title="@string/settings_customize_light_theme_title"
+ app:isPreferenceVisible="false" />
<Preference
app:key="customize_dark_theme"
app:icon="@drawable/ic_dark_theme_preference_24dp"
- app:title="@string/settings_customize_dark_theme_title" />
+ app:title="@string/settings_customize_dark_theme_title"
+ app:isPreferenceVisible="false" />
<Preference
app:key="customize_amoled_theme"
- app:icon="@drawable/ic_dark_theme_preference_24dp"
- app:title="@string/settings_customize_amoled_theme_title" />
+ app:icon="@drawable/ic_amoled_theme_preference_24dp"
+ app:title="@string/settings_customize_amoled_theme_title"
+ app:isPreferenceVisible="false" />
<Preference
app:key="manage_themes"