From 1cfdaf41fa7d4ce4cf7065d13667bef32c27066a Mon Sep 17 00:00:00 2001 From: Alex Ning Date: Fri, 27 Mar 2020 18:08:58 +0800 Subject: Implemented share and import themes. Fixed some issues of custom theme. --- .../drawable-night/ic_import_day_night_24dp.xml | 9 ++ .../main/res/drawable/ic_import_day_night_24dp.xml | 9 ++ .../res/layout/activity_custom_theme_listing.xml | 1 + app/src/main/res/layout/activity_rules.xml | 3 +- app/src/main/res/layout/activity_search_result.xml | 19 +++-- ...tivity_subscribed_subreddits_multiselection.xml | 3 +- .../layout/activity_subscribed_thing_listing.xml | 3 +- .../layout/fragment_create_theme_bottom_sheet.xml | 99 ++++++++++++++++++++++ .../fragment_select_base_theme_bottom_sheet.xml | 81 ------------------ app/src/main/res/layout/item_user_custom_theme.xml | 12 +-- app/src/main/res/values/strings.xml | 16 +++- 11 files changed, 159 insertions(+), 96 deletions(-) create mode 100644 app/src/main/res/drawable-night/ic_import_day_night_24dp.xml create mode 100644 app/src/main/res/drawable/ic_import_day_night_24dp.xml create mode 100644 app/src/main/res/layout/fragment_create_theme_bottom_sheet.xml delete mode 100644 app/src/main/res/layout/fragment_select_base_theme_bottom_sheet.xml (limited to 'app/src/main/res') diff --git a/app/src/main/res/drawable-night/ic_import_day_night_24dp.xml b/app/src/main/res/drawable-night/ic_import_day_night_24dp.xml new file mode 100644 index 00000000..eb39e3f3 --- /dev/null +++ b/app/src/main/res/drawable-night/ic_import_day_night_24dp.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable/ic_import_day_night_24dp.xml b/app/src/main/res/drawable/ic_import_day_night_24dp.xml new file mode 100644 index 00000000..ad852174 --- /dev/null +++ b/app/src/main/res/drawable/ic_import_day_night_24dp.xml @@ -0,0 +1,9 @@ + + + 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 37b8f878..5b35b48c 100644 --- a/app/src/main/res/layout/activity_custom_theme_listing.xml +++ b/app/src/main/res/layout/activity_custom_theme_listing.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_layout_custom_theme_listing_activity" tools:context=".Activity.CustomThemeListingActivity"> + app:popupTheme="@style/AppTheme.PopupOverlay" + app:navigationIcon="?attr/homeAsUpIndicator" /> diff --git a/app/src/main/res/layout/activity_search_result.xml b/app/src/main/res/layout/activity_search_result.xml index c4b132c7..63c8212e 100644 --- a/app/src/main/res/layout/activity_search_result.xml +++ b/app/src/main/res/layout/activity_search_result.xml @@ -14,12 +14,21 @@ android:background="?attr/toolbarAndTabBackgroundColor" android:theme="@style/AppTheme.AppBarOverlay"> - + android:layout_height="match_parent" + app:layout_scrollFlags="scroll|enterAlways" + app:titleEnabled="false" + app:toolbarId="@+id/toolbar_search_result_activity"> + + + + + app:popupTheme="@style/AppTheme.PopupOverlay" + app:navigationIcon="?attr/homeAsUpIndicator" /> diff --git a/app/src/main/res/layout/activity_subscribed_thing_listing.xml b/app/src/main/res/layout/activity_subscribed_thing_listing.xml index 183a0b61..460b1ba6 100644 --- a/app/src/main/res/layout/activity_subscribed_thing_listing.xml +++ b/app/src/main/res/layout/activity_subscribed_thing_listing.xml @@ -28,7 +28,8 @@ android:layout_height="?attr/actionBarSize" app:layout_collapseMode="pin" app:layout_scrollFlags="scroll|enterAlways" - app:popupTheme="@style/AppTheme.PopupOverlay" /> + app:popupTheme="@style/AppTheme.PopupOverlay" + app:navigationIcon="?attr/homeAsUpIndicator" /> diff --git a/app/src/main/res/layout/fragment_create_theme_bottom_sheet.xml b/app/src/main/res/layout/fragment_create_theme_bottom_sheet.xml new file mode 100644 index 00000000..c5ac6fda --- /dev/null +++ b/app/src/main/res/layout/fragment_create_theme_bottom_sheet.xml @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + + + + + \ 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 deleted file mode 100644 index d0adbd83..00000000 --- a/app/src/main/res/layout/fragment_select_base_theme_bottom_sheet.xml +++ /dev/null @@ -1,81 +0,0 @@ - - - - - - - - - - - - - - - - \ 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 55891961..e8c4dc65 100644 --- a/app/src/main/res/layout/item_user_custom_theme.xml +++ b/app/src/main/res/layout/item_user_custom_theme.xml @@ -24,21 +24,21 @@ android:textColor="?attr/primaryTextColor" /> \ 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 22b971ff..a28dfd34 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -431,7 +431,7 @@ Copy Link Copied - Cannot copy the link + Cannot copy the link Copy Copy All Copy Markdown @@ -620,6 +620,20 @@ Are you sure to delete %1$s? Share Theme Change Name + Copied! Paste and share it to other people. + Cannot copy the theme configuration + Cannot find this theme + Import Theme + Cannot find data in clipboard + Import theme successful + Parse Theme Failed + Share it to r/Infinity_For_Reddit? + The theme configuration is copied! + Do you want to share it to r/Infinity so that other people can use it? + Duplicate Theme Found + A theme in the database is also called %1$s. Do you want to change the name of this imported theme? + Rename + Override Color Picker Invalid Color -- cgit v1.2.3