From 550e88b1e62228124f22b2d70ce3bf45fe9a1314 Mon Sep 17 00:00:00 2001 From: d34d Date: Mon, 29 Aug 2016 15:41:02 -0700 Subject: Fall cleaning * Change package name to org.cyanogenmod.theme.chooser2 to avoid theme collisions with old OSS chooser * Change parent theme to Theme.Material.Light * Change minSdkVersion to 21 since we are going material * Add selectors for bottom action buttons (app themer, shop themes) * Add selector, using app themer color, for app themer list view * Add selector for actions in theme cards * Bring back OSS app icon * Reduce log spam in ThemedTypefaceHelper * Localize "new" tag using a TextView instead of an image * Other random stuff Change-Id: I73ef0b9c9370284e29ee00add87273cf54c83e0e --- AndroidManifest.xml | 14 +- .../bg_button_shopthemes_focused.9.png | Bin 484 -> 0 bytes .../bg_button_shopthemes_normal.9.png | Bin 487 -> 0 bytes .../bg_button_shopthemes_pressed.9.png | Bin 655 -> 0 bytes res/drawable-hdpi/bg_tag_new.9.png | Bin 0 -> 221 bytes res/drawable-hdpi/tag_new.png | Bin 721 -> 0 bytes .../bg_button_shopthemes_focused.9.png | Bin 337 -> 0 bytes .../bg_button_shopthemes_normal.9.png | Bin 337 -> 0 bytes .../bg_button_shopthemes_pressed.9.png | Bin 434 -> 0 bytes res/drawable-mdpi/bg_tag_new.9.png | Bin 0 -> 173 bytes res/drawable-mdpi/tag_new.png | Bin 475 -> 0 bytes .../bg_button_shopthemes_focused.9.png | Bin 672 -> 0 bytes .../bg_button_shopthemes_normal.9.png | Bin 679 -> 0 bytes .../bg_button_shopthemes_pressed.9.png | Bin 919 -> 0 bytes res/drawable-xhdpi/bg_tag_new.9.png | Bin 0 -> 279 bytes res/drawable-xhdpi/tag_new.png | Bin 952 -> 0 bytes .../bg_button_shopthemes_focused.9.png | Bin 1030 -> 0 bytes .../bg_button_shopthemes_normal.9.png | Bin 1020 -> 0 bytes .../bg_button_shopthemes_pressed.9.png | Bin 1427 -> 0 bytes res/drawable-xxhdpi/bg_tag_new.9.png | Bin 0 -> 363 bytes res/drawable-xxhdpi/tag_new.png | Bin 1466 -> 0 bytes res/drawable/bottom_action_item_background.xml | 30 + .../per_app_theme_list_item_background.xml | 23 + res/drawable/shop_themes_bg.xml | 27 - res/drawable/theme_card_action_item_background.xml | 26 + res/layout/activity_main.xml | 20 +- res/layout/audible_card.xml | 4 +- res/layout/bootanim_card.xml | 4 +- res/layout/bottom_actions.xml | 22 +- res/layout/component_selector.xml | 7 +- res/layout/font_card.xml | 4 +- res/layout/fragment_pager_list.xml | 89 +- res/layout/icon_card.xml | 4 +- res/layout/navbar_card.xml | 4 +- res/layout/per_app_theme_list.xml | 5 +- res/layout/save_apply_button.xml | 42 +- res/layout/status_bar_card.xml | 4 +- res/layout/style_card.xml | 4 +- res/layout/title_card.xml | 105 + res/layout/wallpaper_component_selection_item.xml | 4 +- res/mipmap-hdpi/ic_app_themes.png | Bin 22564 -> 4719 bytes res/mipmap-mdpi/ic_app_themes.png | Bin 21567 -> 3023 bytes res/mipmap-xhdpi/ic_app_themes.png | Bin 24105 -> 6555 bytes res/mipmap-xxhdpi/ic_app_themes.png | Bin 27806 -> 10346 bytes res/mipmap-xxxhdpi/ic_app_themes.png | Bin 32205 -> 14244 bytes res/values/colors.xml | 9 + res/values/dimens.xml | 4 + res/values/strings.xml | 2 + res/values/styles.xml | 2 +- src/android/support/v4/view/ThemeViewPager.java | 2 +- .../viewpagerindicator/CirclePageIndicator.java | 2 +- src/org/cyanogenmod/theme/chooser/AppReceiver.java | 73 - .../cyanogenmod/theme/chooser/BootReceiver.java | 56 - .../cyanogenmod/theme/chooser/ChooserActivity.java | 1191 -------- .../theme/chooser/ComponentCardView.java | 233 -- .../theme/chooser/ComponentSelector.java | 934 ------ .../theme/chooser/IconTransitionDrawable.java | 171 -- .../cyanogenmod/theme/chooser/MyThemeFragment.java | 707 ----- .../chooser/NewFragmentStatePagerAdapter.java | 333 --- .../chooser/NotificationHijackingService.java | 88 - .../cyanogenmod/theme/chooser/PagerContainer.java | 219 -- .../cyanogenmod/theme/chooser/ThemeFragment.java | 3059 -------------------- .../theme/chooser/WallpaperCardView.java | 160 - .../cyanogenmod/theme/chooser2/AppReceiver.java | 71 + .../cyanogenmod/theme/chooser2/BootReceiver.java | 56 + .../theme/chooser2/ChooserActivity.java | 1185 ++++++++ .../theme/chooser2/ComponentCardView.java | 232 ++ .../theme/chooser2/ComponentSelector.java | 934 ++++++ .../theme/chooser2/IconTransitionDrawable.java | 171 ++ .../theme/chooser2/MyThemeFragment.java | 707 +++++ .../chooser2/NewFragmentStatePagerAdapter.java | 333 +++ .../chooser2/NotificationHijackingService.java | 88 + .../cyanogenmod/theme/chooser2/PagerContainer.java | 219 ++ .../cyanogenmod/theme/chooser2/ThemeFragment.java | 3059 ++++++++++++++++++++ .../theme/chooser2/WallpaperCardView.java | 160 + .../theme/perapptheming/PerAppThemeListLayout.java | 3 +- .../theme/perapptheming/PerAppThemeListView.java | 2 +- .../theme/perapptheming/PerAppThemingWindow.java | 9 +- .../cyanogenmod/theme/util/NotificationHelper.java | 5 +- .../theme/util/ThemedTypefaceHelper.java | 4 +- src/org/cyanogenmod/theme/util/Utils.java | 3 +- .../theme/widget/ConfirmCancelOverlay.java | 2 +- src/org/cyanogenmod/theme/widget/LatoTextView.java | 2 +- .../cyanogenmod/theme/widget/ThemeTagLayout.java | 2 +- 84 files changed, 7502 insertions(+), 7432 deletions(-) delete mode 100644 res/drawable-hdpi/bg_button_shopthemes_focused.9.png delete mode 100644 res/drawable-hdpi/bg_button_shopthemes_normal.9.png delete mode 100644 res/drawable-hdpi/bg_button_shopthemes_pressed.9.png create mode 100644 res/drawable-hdpi/bg_tag_new.9.png delete mode 100644 res/drawable-hdpi/tag_new.png delete mode 100644 res/drawable-mdpi/bg_button_shopthemes_focused.9.png delete mode 100644 res/drawable-mdpi/bg_button_shopthemes_normal.9.png delete mode 100644 res/drawable-mdpi/bg_button_shopthemes_pressed.9.png create mode 100644 res/drawable-mdpi/bg_tag_new.9.png delete mode 100644 res/drawable-mdpi/tag_new.png delete mode 100644 res/drawable-xhdpi/bg_button_shopthemes_focused.9.png delete mode 100644 res/drawable-xhdpi/bg_button_shopthemes_normal.9.png delete mode 100644 res/drawable-xhdpi/bg_button_shopthemes_pressed.9.png create mode 100644 res/drawable-xhdpi/bg_tag_new.9.png delete mode 100644 res/drawable-xhdpi/tag_new.png delete mode 100644 res/drawable-xxhdpi/bg_button_shopthemes_focused.9.png delete mode 100644 res/drawable-xxhdpi/bg_button_shopthemes_normal.9.png delete mode 100644 res/drawable-xxhdpi/bg_button_shopthemes_pressed.9.png create mode 100644 res/drawable-xxhdpi/bg_tag_new.9.png delete mode 100644 res/drawable-xxhdpi/tag_new.png create mode 100644 res/drawable/bottom_action_item_background.xml create mode 100644 res/drawable/per_app_theme_list_item_background.xml delete mode 100644 res/drawable/shop_themes_bg.xml create mode 100644 res/drawable/theme_card_action_item_background.xml create mode 100644 res/layout/title_card.xml delete mode 100644 src/org/cyanogenmod/theme/chooser/AppReceiver.java delete mode 100644 src/org/cyanogenmod/theme/chooser/BootReceiver.java delete mode 100644 src/org/cyanogenmod/theme/chooser/ChooserActivity.java delete mode 100644 src/org/cyanogenmod/theme/chooser/ComponentCardView.java delete mode 100644 src/org/cyanogenmod/theme/chooser/ComponentSelector.java delete mode 100644 src/org/cyanogenmod/theme/chooser/IconTransitionDrawable.java delete mode 100644 src/org/cyanogenmod/theme/chooser/MyThemeFragment.java delete mode 100644 src/org/cyanogenmod/theme/chooser/NewFragmentStatePagerAdapter.java delete mode 100644 src/org/cyanogenmod/theme/chooser/NotificationHijackingService.java delete mode 100644 src/org/cyanogenmod/theme/chooser/PagerContainer.java delete mode 100644 src/org/cyanogenmod/theme/chooser/ThemeFragment.java delete mode 100644 src/org/cyanogenmod/theme/chooser/WallpaperCardView.java create mode 100644 src/org/cyanogenmod/theme/chooser2/AppReceiver.java create mode 100644 src/org/cyanogenmod/theme/chooser2/BootReceiver.java create mode 100644 src/org/cyanogenmod/theme/chooser2/ChooserActivity.java create mode 100644 src/org/cyanogenmod/theme/chooser2/ComponentCardView.java create mode 100644 src/org/cyanogenmod/theme/chooser2/ComponentSelector.java create mode 100644 src/org/cyanogenmod/theme/chooser2/IconTransitionDrawable.java create mode 100644 src/org/cyanogenmod/theme/chooser2/MyThemeFragment.java create mode 100644 src/org/cyanogenmod/theme/chooser2/NewFragmentStatePagerAdapter.java create mode 100644 src/org/cyanogenmod/theme/chooser2/NotificationHijackingService.java create mode 100644 src/org/cyanogenmod/theme/chooser2/PagerContainer.java create mode 100644 src/org/cyanogenmod/theme/chooser2/ThemeFragment.java create mode 100644 src/org/cyanogenmod/theme/chooser2/WallpaperCardView.java diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 6ed9716..2c3fbf1 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -17,7 +17,7 @@ --> @@ -59,7 +59,7 @@ android:protectionLevel="signatureOrSystem" /> - - @@ -102,7 +102,7 @@ - + @@ -117,7 +117,7 @@ - diff --git a/res/drawable-hdpi/bg_button_shopthemes_focused.9.png b/res/drawable-hdpi/bg_button_shopthemes_focused.9.png deleted file mode 100644 index 669e672..0000000 Binary files a/res/drawable-hdpi/bg_button_shopthemes_focused.9.png and /dev/null differ diff --git a/res/drawable-hdpi/bg_button_shopthemes_normal.9.png b/res/drawable-hdpi/bg_button_shopthemes_normal.9.png deleted file mode 100644 index 09d03d5..0000000 Binary files a/res/drawable-hdpi/bg_button_shopthemes_normal.9.png and /dev/null differ diff --git a/res/drawable-hdpi/bg_button_shopthemes_pressed.9.png b/res/drawable-hdpi/bg_button_shopthemes_pressed.9.png deleted file mode 100644 index b6fada6..0000000 Binary files a/res/drawable-hdpi/bg_button_shopthemes_pressed.9.png and /dev/null differ diff --git a/res/drawable-hdpi/bg_tag_new.9.png b/res/drawable-hdpi/bg_tag_new.9.png new file mode 100644 index 0000000..25baf5c Binary files /dev/null and b/res/drawable-hdpi/bg_tag_new.9.png differ diff --git a/res/drawable-hdpi/tag_new.png b/res/drawable-hdpi/tag_new.png deleted file mode 100644 index 528e166..0000000 Binary files a/res/drawable-hdpi/tag_new.png and /dev/null differ diff --git a/res/drawable-mdpi/bg_button_shopthemes_focused.9.png b/res/drawable-mdpi/bg_button_shopthemes_focused.9.png deleted file mode 100644 index 79b28e3..0000000 Binary files a/res/drawable-mdpi/bg_button_shopthemes_focused.9.png and /dev/null differ diff --git a/res/drawable-mdpi/bg_button_shopthemes_normal.9.png b/res/drawable-mdpi/bg_button_shopthemes_normal.9.png deleted file mode 100644 index 8848e28..0000000 Binary files a/res/drawable-mdpi/bg_button_shopthemes_normal.9.png and /dev/null differ diff --git a/res/drawable-mdpi/bg_button_shopthemes_pressed.9.png b/res/drawable-mdpi/bg_button_shopthemes_pressed.9.png deleted file mode 100644 index fdfdc7a..0000000 Binary files a/res/drawable-mdpi/bg_button_shopthemes_pressed.9.png and /dev/null differ diff --git a/res/drawable-mdpi/bg_tag_new.9.png b/res/drawable-mdpi/bg_tag_new.9.png new file mode 100644 index 0000000..77b4f0f Binary files /dev/null and b/res/drawable-mdpi/bg_tag_new.9.png differ diff --git a/res/drawable-mdpi/tag_new.png b/res/drawable-mdpi/tag_new.png deleted file mode 100644 index c4cef73..0000000 Binary files a/res/drawable-mdpi/tag_new.png and /dev/null differ diff --git a/res/drawable-xhdpi/bg_button_shopthemes_focused.9.png b/res/drawable-xhdpi/bg_button_shopthemes_focused.9.png deleted file mode 100644 index f74db4d..0000000 Binary files a/res/drawable-xhdpi/bg_button_shopthemes_focused.9.png and /dev/null differ diff --git a/res/drawable-xhdpi/bg_button_shopthemes_normal.9.png b/res/drawable-xhdpi/bg_button_shopthemes_normal.9.png deleted file mode 100644 index 1a2b6a0..0000000 Binary files a/res/drawable-xhdpi/bg_button_shopthemes_normal.9.png and /dev/null differ diff --git a/res/drawable-xhdpi/bg_button_shopthemes_pressed.9.png b/res/drawable-xhdpi/bg_button_shopthemes_pressed.9.png deleted file mode 100644 index 1ea49ba..0000000 Binary files a/res/drawable-xhdpi/bg_button_shopthemes_pressed.9.png and /dev/null differ diff --git a/res/drawable-xhdpi/bg_tag_new.9.png b/res/drawable-xhdpi/bg_tag_new.9.png new file mode 100644 index 0000000..fb8781c Binary files /dev/null and b/res/drawable-xhdpi/bg_tag_new.9.png differ diff --git a/res/drawable-xhdpi/tag_new.png b/res/drawable-xhdpi/tag_new.png deleted file mode 100644 index aaad607..0000000 Binary files a/res/drawable-xhdpi/tag_new.png and /dev/null differ diff --git a/res/drawable-xxhdpi/bg_button_shopthemes_focused.9.png b/res/drawable-xxhdpi/bg_button_shopthemes_focused.9.png deleted file mode 100644 index c92c6c9..0000000 Binary files a/res/drawable-xxhdpi/bg_button_shopthemes_focused.9.png and /dev/null differ diff --git a/res/drawable-xxhdpi/bg_button_shopthemes_normal.9.png b/res/drawable-xxhdpi/bg_button_shopthemes_normal.9.png deleted file mode 100644 index e4d5577..0000000 Binary files a/res/drawable-xxhdpi/bg_button_shopthemes_normal.9.png and /dev/null differ diff --git a/res/drawable-xxhdpi/bg_button_shopthemes_pressed.9.png b/res/drawable-xxhdpi/bg_button_shopthemes_pressed.9.png deleted file mode 100644 index 3eee7b7..0000000 Binary files a/res/drawable-xxhdpi/bg_button_shopthemes_pressed.9.png and /dev/null differ diff --git a/res/drawable-xxhdpi/bg_tag_new.9.png b/res/drawable-xxhdpi/bg_tag_new.9.png new file mode 100644 index 0000000..fd9233d Binary files /dev/null and b/res/drawable-xxhdpi/bg_tag_new.9.png differ diff --git a/res/drawable-xxhdpi/tag_new.png b/res/drawable-xxhdpi/tag_new.png deleted file mode 100644 index c6d6700..0000000 Binary files a/res/drawable-xxhdpi/tag_new.png and /dev/null differ diff --git a/res/drawable/bottom_action_item_background.xml b/res/drawable/bottom_action_item_background.xml new file mode 100644 index 0000000..4689ee1 --- /dev/null +++ b/res/drawable/bottom_action_item_background.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + + diff --git a/res/drawable/per_app_theme_list_item_background.xml b/res/drawable/per_app_theme_list_item_background.xml new file mode 100644 index 0000000..edd4a1d --- /dev/null +++ b/res/drawable/per_app_theme_list_item_background.xml @@ -0,0 +1,23 @@ + + + + + + + + diff --git a/res/drawable/shop_themes_bg.xml b/res/drawable/shop_themes_bg.xml deleted file mode 100644 index f0384e9..0000000 --- a/res/drawable/shop_themes_bg.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/res/drawable/theme_card_action_item_background.xml b/res/drawable/theme_card_action_item_background.xml new file mode 100644 index 0000000..dc575df --- /dev/null +++ b/res/drawable/theme_card_action_item_background.xml @@ -0,0 +1,26 @@ + + + + + + + + + + + diff --git a/res/layout/activity_main.xml b/res/layout/activity_main.xml index 01a91a6..552bed3 100644 --- a/res/layout/activity_main.xml +++ b/res/layout/activity_main.xml @@ -29,7 +29,7 @@ android:layout_height="match_parent" android:orientation="vertical" android:layout_gravity="center_vertical"> - - + - - - + + + + + + + + diff --git a/res/layout/audible_card.xml b/res/layout/audible_card.xml index 764a04e..b8856d1 100644 --- a/res/layout/audible_card.xml +++ b/res/layout/audible_card.xml @@ -16,7 +16,7 @@ limitations under the License. --> - - + diff --git a/res/layout/bootanim_card.xml b/res/layout/bootanim_card.xml index ad3cb01..c3a0f1b 100644 --- a/res/layout/bootanim_card.xml +++ b/res/layout/bootanim_card.xml @@ -16,7 +16,7 @@ limitations under the License. --> - - + diff --git a/res/layout/bottom_actions.xml b/res/layout/bottom_actions.xml index 67f8461..ef4225d 100644 --- a/res/layout/bottom_actions.xml +++ b/res/layout/bottom_actions.xml @@ -34,7 +34,8 @@ android:id="@+id/per_app_theming" android:layout_width="80dp" android:layout_height="wrap_content" - android:orientation="vertical"> + android:orientation="vertical" + android:background="@drawable/bottom_action_item_background"> - @@ -69,7 +79,8 @@ android:layout_width="80dp" android:layout_height="wrap_content" android:layout_marginLeft="20dp" - android:orientation="vertical"> + android:orientation="vertical" + android:background="@drawable/bottom_action_item_background"> - diff --git a/res/layout/component_selector.xml b/res/layout/component_selector.xml index 14b13de..42be00b 100644 --- a/res/layout/component_selector.xml +++ b/res/layout/component_selector.xml @@ -16,7 +16,7 @@ limitations under the License. --> - - - \ No newline at end of file + \ No newline at end of file diff --git a/res/layout/font_card.xml b/res/layout/font_card.xml index 3b4808d..3a58f93 100644 --- a/res/layout/font_card.xml +++ b/res/layout/font_card.xml @@ -16,7 +16,7 @@ limitations under the License. --> - - + diff --git a/res/layout/fragment_pager_list.xml b/res/layout/fragment_pager_list.xml index ca1d092..609dbaa 100644 --- a/res/layout/fragment_pager_list.xml +++ b/res/layout/fragment_pager_list.xml @@ -77,90 +77,7 @@ - - - - - - - - - - - - - - - - + @@ -171,7 +88,7 @@ android:orientation="vertical" android:layout_marginTop="@dimen/additional_cards_margin_top" android:visibility="invisible"> - - - - \ No newline at end of file + \ No newline at end of file diff --git a/res/layout/navbar_card.xml b/res/layout/navbar_card.xml index b196f6a..437f4c3 100644 --- a/res/layout/navbar_card.xml +++ b/res/layout/navbar_card.xml @@ -16,7 +16,7 @@ limitations under the License. --> - - \ No newline at end of file + \ No newline at end of file diff --git a/res/layout/per_app_theme_list.xml b/res/layout/per_app_theme_list.xml index be595c9..1feb993 100644 --- a/res/layout/per_app_theme_list.xml +++ b/res/layout/per_app_theme_list.xml @@ -34,14 +34,15 @@ android:elevation="10dp" android:layout_marginLeft="@dimen/theme_list_side_margin" android:layout_marginRight="@dimen/theme_list_side_margin" - android:background="@drawable/per_app_theme_list_background"/> + android:background="@drawable/per_app_theme_list_background" + android:listSelector="@drawable/per_app_theme_list_item_background"/> diff --git a/res/layout/save_apply_button.xml b/res/layout/save_apply_button.xml index ac0fee9..1009c9c 100644 --- a/res/layout/save_apply_button.xml +++ b/res/layout/save_apply_button.xml @@ -16,36 +16,12 @@ limitations under the License. --> - - - - - - -