diff options
author | Alex Ning <chineseperson5@gmail.com> | 2020-03-25 10:06:43 +0000 |
---|---|---|
committer | Alex Ning <chineseperson5@gmail.com> | 2020-03-25 10:06:43 +0000 |
commit | 0694c471c4ba39fa8235e1ecfcc4e8e40ad13ad2 (patch) | |
tree | 362afbd4a08e0a4361df14a341170880663996a2 /app/src/main/res | |
parent | f5fc3850392601797a44c6dc07128155a420faa7 (diff) | |
download | infinity-for-reddit-0694c471c4ba39fa8235e1ecfcc4e8e40ad13ad2.tar infinity-for-reddit-0694c471c4ba39fa8235e1ecfcc4e8e40ad13ad2.tar.gz infinity-for-reddit-0694c471c4ba39fa8235e1ecfcc4e8e40ad13ad2.tar.bz2 infinity-for-reddit-0694c471c4ba39fa8235e1ecfcc4e8e40ad13ad2.tar.lz infinity-for-reddit-0694c471c4ba39fa8235e1ecfcc4e8e40ad13ad2.tar.xz infinity-for-reddit-0694c471c4ba39fa8235e1ecfcc4e8e40ad13ad2.tar.zst infinity-for-reddit-0694c471c4ba39fa8235e1ecfcc4e8e40ad13ad2.zip |
Fix some bugs in CustomizeThemeActivity.
Diffstat (limited to '')
-rw-r--r-- | app/src/main/res/layout/item_predefined_custom_theme.xml (renamed from app/src/main/res/layout/item_custom_theme.xml) | 9 | ||||
-rw-r--r-- | app/src/main/res/layout/item_theme_name.xml | 24 | ||||
-rw-r--r-- | app/src/main/res/layout/item_user_custom_theme.xml | 44 | ||||
-rw-r--r-- | app/src/main/res/values/strings.xml | 11 | ||||
-rw-r--r-- | app/src/main/res/xml/theme_preferences.xml | 4 |
5 files changed, 82 insertions, 10 deletions
diff --git a/app/src/main/res/layout/item_custom_theme.xml b/app/src/main/res/layout/item_predefined_custom_theme.xml index 1aba3472..432628b1 100644 --- a/app/src/main/res/layout/item_custom_theme.xml +++ b/app/src/main/res/layout/item_predefined_custom_theme.xml @@ -8,15 +8,18 @@ android:background="?attr/selectableItemBackground"> <View - android:id="@+id/color_primary_item_custom_theme" + android:id="@+id/color_primary_item_predefined_custom_theme" android:layout_width="24dp" android:layout_height="24dp" + android:layout_gravity="center_vertical" android:background="@drawable/circular_background" /> <TextView - android:id="@+id/name_text_view_item_custom_theme" + android:id="@+id/name_text_view_item_predefined_custom_theme" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginStart="32dp" /> + android:layout_marginStart="32dp" + android:layout_gravity="center_vertical" + android:textColor="?attr/primaryTextColor" /> </LinearLayout>
\ No newline at end of file diff --git a/app/src/main/res/layout/item_theme_name.xml b/app/src/main/res/layout/item_theme_name.xml new file mode 100644 index 00000000..84c49d7c --- /dev/null +++ b/app/src/main/res/layout/item_theme_name.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="utf-8"?> +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:orientation="vertical" android:layout_width="match_parent" + android:layout_height="wrap_content" + android:padding="16dp" + android:clickable="true" + android:focusable="true" + android:background="?attr/selectableItemBackground"> + + <TextView + android:id="@+id/theme_name_text_view_item_theme_name" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:textColor="?attr/primaryTextColor" /> + + <TextView + android:id="@+id/description_text_view_item_theme_name" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginTop="4dp" + android:text="@string/theme_name_description" + android:textColor="?attr/secondaryTextColor" /> + +</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 new file mode 100644 index 00000000..fe610557 --- /dev/null +++ b/app/src/main/res/layout/item_user_custom_theme.xml @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="utf-8"?> +<LinearLayout + xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" + android:layout_height="wrap_content" + android:padding="16dp" + android:clickable="true" + android:focusable="true" + android:background="?attr/selectableItemBackground"> + + <View + android:id="@+id/color_primary_item_user_custom_theme" + android:layout_width="24dp" + android:layout_height="24dp" + android:layout_gravity="center_vertical" + android:background="@drawable/circular_background" /> + + <TextView + android:id="@+id/name_text_view_item_user_custom_theme" + 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/delete_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:background="?attr/selectableItemBackgroundBorderless" /> + + <ImageView + android:id="@+id/share_image_view_item_user_custom_theme" + android:layout_width="24dp" + android:layout_height="24dp" + android:layout_gravity="center_vertical" + android:layout_marginStart="16dp" + android:src="@drawable/ic_share_24dp" + android:background="?attr/selectableItemBackgroundBorderless" /> + +</LinearLayout>
\ 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 b8d4e657..56a0e264 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -362,7 +362,7 @@ <string name="settings_customize_light_theme_title">Light Theme</string> <string name="settings_customize_dark_theme_title">Dark Theme</string> <string name="settings_customize_amoled_theme_title">Amoled Theme</string> - <string name="settings_select_and_customize_theme_title">Select and Customize Themes</string> + <string name="settings_manage_themes_title">Manage Themes</string> <string name="settings_custom_theme_cannot_apply_to_settings_page_title">Custom themes cannot be applied to settings page.</string> <string name="no_link_available">Cannot get the link</string> @@ -467,10 +467,11 @@ <string name="save_image_before_sharing">Saving the image. Please wait.</string> <string name="save_gif_before_sharing">Saving the gif. Please wait.</string> - <string name="customize_light_theme_fragment_title">Customize Light Theme</string> - <string name="customize_dark_theme_fragment_title">Customize Dark Theme</string> - <string name="customize_amoled_theme_fragment_title">Customize Amoled Theme</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> <string name="theme_item_color_primary">Color Primary</string> <string name="theme_item_color_primary_detail">Applied to: Toolbar</string> <string name="theme_item_color_primary_dark">Color Primary Dark</string> diff --git a/app/src/main/res/xml/theme_preferences.xml b/app/src/main/res/xml/theme_preferences.xml index 5bcc5ef3..e6aec71f 100644 --- a/app/src/main/res/xml/theme_preferences.xml +++ b/app/src/main/res/xml/theme_preferences.xml @@ -34,9 +34,9 @@ app:title="@string/settings_customize_amoled_theme_title" /> <Preference - app:key="select_and_customize_theme" + app:key="manage_themes" app:icon="@drawable/ic_edit_24dp" - app:title="@string/settings_select_and_customize_theme_title" /> + app:title="@string/settings_manage_themes_title" /> <Preference app:summary="@string/settings_custom_theme_cannot_apply_to_settings_page_title" |