diff options
author | Clark Scheff <clark@cyngn.com> | 2015-02-20 19:59:52 -0800 |
---|---|---|
committer | Clark Scheff <clark@cyngn.com> | 2015-02-27 10:10:31 -0800 |
commit | f4207231fe36963ee977ab85c27ecccbd2b7dd93 (patch) | |
tree | 6695c813c71679bc0c38b5da436d53df295f3f24 /res | |
parent | e58652dbcbcbd0967fce0128b123ffdad240de98 (diff) | |
download | packages_apps_ThemeChooser-f4207231fe36963ee977ab85c27ecccbd2b7dd93.zip packages_apps_ThemeChooser-f4207231fe36963ee977ab85c27ecccbd2b7dd93.tar.gz packages_apps_ThemeChooser-f4207231fe36963ee977ab85c27ecccbd2b7dd93.tar.bz2 |
Themes: Enhanced theming capabilities [3/3]
This is really per-app theming but the subject is being named
the same as the open source commits to avoid confusion.
Change-Id: I811463be11359d747065ad66f802a55e1ab7db08
Diffstat (limited to 'res')
38 files changed, 216 insertions, 33 deletions
diff --git a/res/drawable-hdpi/btn_quicktheme_remove.png b/res/drawable-hdpi/btn_quicktheme_remove.png Binary files differnew file mode 100644 index 0000000..5addcdf --- /dev/null +++ b/res/drawable-hdpi/btn_quicktheme_remove.png diff --git a/res/drawable-hdpi/ic_quickthemes.png b/res/drawable-hdpi/ic_quickthemes.png Binary files differnew file mode 100644 index 0000000..eaabb60 --- /dev/null +++ b/res/drawable-hdpi/ic_quickthemes.png diff --git a/res/drawable-hdpi/ic_quickthemes_qstile.png b/res/drawable-hdpi/ic_quickthemes_qstile.png Binary files differnew file mode 100644 index 0000000..a5404d8 --- /dev/null +++ b/res/drawable-hdpi/ic_quickthemes_qstile.png diff --git a/res/drawable-hdpi/ic_themestore.png b/res/drawable-hdpi/ic_themestore.png Binary files differnew file mode 100644 index 0000000..a99b5a7 --- /dev/null +++ b/res/drawable-hdpi/ic_themestore.png diff --git a/res/drawable-hdpi/quick_theme_fab.png b/res/drawable-hdpi/quick_theme_fab.png Binary files differnew file mode 100644 index 0000000..011b4c5 --- /dev/null +++ b/res/drawable-hdpi/quick_theme_fab.png diff --git a/res/drawable-hdpi/tag_new.png b/res/drawable-hdpi/tag_new.png Binary files differnew file mode 100644 index 0000000..528e166 --- /dev/null +++ b/res/drawable-hdpi/tag_new.png diff --git a/res/drawable-mdpi/btn_quicktheme_remove.png b/res/drawable-mdpi/btn_quicktheme_remove.png Binary files differnew file mode 100644 index 0000000..1f6f729 --- /dev/null +++ b/res/drawable-mdpi/btn_quicktheme_remove.png diff --git a/res/drawable-mdpi/ic_quickthemes.png b/res/drawable-mdpi/ic_quickthemes.png Binary files differnew file mode 100644 index 0000000..bfb3a64 --- /dev/null +++ b/res/drawable-mdpi/ic_quickthemes.png diff --git a/res/drawable-mdpi/ic_quickthemes_qstile.png b/res/drawable-mdpi/ic_quickthemes_qstile.png Binary files differnew file mode 100644 index 0000000..c7297ce --- /dev/null +++ b/res/drawable-mdpi/ic_quickthemes_qstile.png diff --git a/res/drawable-mdpi/ic_themestore.png b/res/drawable-mdpi/ic_themestore.png Binary files differnew file mode 100644 index 0000000..2c8e0d1 --- /dev/null +++ b/res/drawable-mdpi/ic_themestore.png diff --git a/res/drawable-mdpi/quick_theme_fab.png b/res/drawable-mdpi/quick_theme_fab.png Binary files differnew file mode 100644 index 0000000..b8844bb --- /dev/null +++ b/res/drawable-mdpi/quick_theme_fab.png diff --git a/res/drawable-mdpi/tag_new.png b/res/drawable-mdpi/tag_new.png Binary files differnew file mode 100644 index 0000000..c4cef73 --- /dev/null +++ b/res/drawable-mdpi/tag_new.png diff --git a/res/drawable-xhdpi/btn_quicktheme_remove.png b/res/drawable-xhdpi/btn_quicktheme_remove.png Binary files differnew file mode 100644 index 0000000..468cc11 --- /dev/null +++ b/res/drawable-xhdpi/btn_quicktheme_remove.png diff --git a/res/drawable-xhdpi/ic_quickthemes.png b/res/drawable-xhdpi/ic_quickthemes.png Binary files differnew file mode 100644 index 0000000..bbb2441 --- /dev/null +++ b/res/drawable-xhdpi/ic_quickthemes.png diff --git a/res/drawable-xhdpi/ic_quickthemes_qstile.png b/res/drawable-xhdpi/ic_quickthemes_qstile.png Binary files differnew file mode 100644 index 0000000..cf8dc52 --- /dev/null +++ b/res/drawable-xhdpi/ic_quickthemes_qstile.png diff --git a/res/drawable-xhdpi/ic_themestore.png b/res/drawable-xhdpi/ic_themestore.png Binary files differnew file mode 100644 index 0000000..e64c3f4 --- /dev/null +++ b/res/drawable-xhdpi/ic_themestore.png diff --git a/res/drawable-xhdpi/quick_theme_fab.png b/res/drawable-xhdpi/quick_theme_fab.png Binary files differnew file mode 100644 index 0000000..53c762e --- /dev/null +++ b/res/drawable-xhdpi/quick_theme_fab.png diff --git a/res/drawable-xhdpi/tag_new.png b/res/drawable-xhdpi/tag_new.png Binary files differnew file mode 100644 index 0000000..aaad607 --- /dev/null +++ b/res/drawable-xhdpi/tag_new.png diff --git a/res/drawable-xxhdpi/btn_quicktheme_remove.png b/res/drawable-xxhdpi/btn_quicktheme_remove.png Binary files differnew file mode 100644 index 0000000..f4b1ee1 --- /dev/null +++ b/res/drawable-xxhdpi/btn_quicktheme_remove.png diff --git a/res/drawable-xxhdpi/ic_quickthemes.png b/res/drawable-xxhdpi/ic_quickthemes.png Binary files differnew file mode 100644 index 0000000..fdb1427 --- /dev/null +++ b/res/drawable-xxhdpi/ic_quickthemes.png diff --git a/res/drawable-xxhdpi/ic_quickthemes_qstile.png b/res/drawable-xxhdpi/ic_quickthemes_qstile.png Binary files differnew file mode 100644 index 0000000..f44c87c --- /dev/null +++ b/res/drawable-xxhdpi/ic_quickthemes_qstile.png diff --git a/res/drawable-xxhdpi/ic_themestore.png b/res/drawable-xxhdpi/ic_themestore.png Binary files differnew file mode 100644 index 0000000..39d9feb --- /dev/null +++ b/res/drawable-xxhdpi/ic_themestore.png diff --git a/res/drawable-xxhdpi/quick_theme_fab.png b/res/drawable-xxhdpi/quick_theme_fab.png Binary files differnew file mode 100644 index 0000000..504528d --- /dev/null +++ b/res/drawable-xxhdpi/quick_theme_fab.png diff --git a/res/drawable-xxhdpi/tag_new.png b/res/drawable-xxhdpi/tag_new.png Binary files differnew file mode 100644 index 0000000..c6d6700 --- /dev/null +++ b/res/drawable-xxhdpi/tag_new.png diff --git a/res/drawable/btn_quicktheme_remove_hover.xml b/res/drawable/btn_quicktheme_remove_hover.xml new file mode 100644 index 0000000..1b7faad --- /dev/null +++ b/res/drawable/btn_quicktheme_remove_hover.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="utf-8"?> +<shape xmlns:android="http://schemas.android.com/apk/res/android" + android:shape="rectangle"> + + <solid android:color="@color/per_app_theme_remove_background_hover"/> + +</shape>
\ No newline at end of file diff --git a/res/drawable/btn_quicktheme_remove_normal.xml b/res/drawable/btn_quicktheme_remove_normal.xml new file mode 100644 index 0000000..f2f0bbe --- /dev/null +++ b/res/drawable/btn_quicktheme_remove_normal.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="utf-8"?> +<shape xmlns:android="http://schemas.android.com/apk/res/android" + android:shape="rectangle"> + + <solid android:color="@color/per_app_theme_remove_background_normal"/> + +</shape>
\ No newline at end of file diff --git a/res/drawable/per_app_theme_list_background.xml b/res/drawable/per_app_theme_list_background.xml new file mode 100644 index 0000000..09868c3 --- /dev/null +++ b/res/drawable/per_app_theme_list_background.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="utf-8"?> +<shape xmlns:android="http://schemas.android.com/apk/res/android" + android:shape="rectangle"> + <corners android:radius="4dp"/> + <solid android:color="@color/per_app_theme_bg_color" /> +</shape>
\ No newline at end of file diff --git a/res/layout/activity_main.xml b/res/layout/activity_main.xml index 54d0eb3..6c7bab8 100644 --- a/res/layout/activity_main.xml +++ b/res/layout/activity_main.xml @@ -32,6 +32,6 @@ <include layout="@layout/component_selector"/> <include layout="@layout/save_apply_button"/> - <include layout="@layout/shop_themes"/> + <include layout="@layout/bottom_actions"/> </FrameLayout> diff --git a/res/layout/bottom_actions.xml b/res/layout/bottom_actions.xml new file mode 100644 index 0000000..b2eb936 --- /dev/null +++ b/res/layout/bottom_actions.xml @@ -0,0 +1,81 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + Copyright (C) 2014 Cyanogen, Inc. +--> +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+id/bottom_actions_layout" + android:orientation="vertical" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="bottom|center_horizontal" + android:alpha="0"> + + <LinearLayout + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginBottom="@dimen/shop_themes_margin_bottom" + android:orientation="horizontal"> + + <LinearLayout + android:id="@+id/per_app_theming" + android:layout_width="80dp" + android:layout_height="wrap_content" + android:orientation="vertical"> + + <FrameLayout + android:layout_width="match_parent" + android:layout_height="wrap_content"> + <ImageView + android:layout_width="30dp" + android:layout_height="30dp" + android:layout_gravity="top|center_horizontal" + android:layout_margin="8dp" + android:src="@drawable/ic_quickthemes"/> + <ImageView + android:id="@+id/new_tag" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="bottom|left" + android:layout_marginLeft="6dp" + android:src="@drawable/tag_new" + android:visibility="gone"/> + </FrameLayout> + + <com.cyngn.theme.widget.LatoTextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center_horizontal" + android:textSize="12sp" + android:textColor="#fff" + android:text="@string/per_app_theming_title"/> + </LinearLayout> + + <LinearLayout + android:id="@+id/shop_themes" + android:layout_width="80dp" + android:layout_height="wrap_content" + android:layout_marginLeft="20dp" + android:orientation="vertical"> + + <ImageView + android:layout_width="30dp" + android:layout_height="30dp" + android:layout_gravity="center_horizontal" + android:layout_margin="8dp" + android:src="@drawable/ic_themestore"/> + + <com.cyngn.theme.widget.LatoTextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center_horizontal" + android:textSize="12sp" + android:textColor="#fff" + android:text="@string/shop_themes"/> + </LinearLayout> + + </LinearLayout> + + <com.cyngn.theme.widget.NavBarSpace + android:layout_width="match_parent" + android:layout_height="@*android:dimen/navigation_bar_height"/> +</LinearLayout>
\ No newline at end of file diff --git a/res/layout/per_app_delete_box_window.xml b/res/layout/per_app_delete_box_window.xml new file mode 100644 index 0000000..c653320 --- /dev/null +++ b/res/layout/per_app_delete_box_window.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="utf-8"?> +<ImageView xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+id/box" + android:layout_width="match_parent" + android:layout_height="@dimen/floating_window_delete_box_height" + android:src="@drawable/btn_quicktheme_remove" + android:scaleType="center" + android:background="@drawable/btn_quicktheme_remove_normal"> + +</ImageView>
\ No newline at end of file diff --git a/res/layout/per_app_fab_floating_window_icon.xml b/res/layout/per_app_fab_floating_window_icon.xml new file mode 100644 index 0000000..b7e992f --- /dev/null +++ b/res/layout/per_app_fab_floating_window_icon.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="utf-8"?> +<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + android:layout_height="match_parent"> + + <FrameLayout android:id="@+id/box" + android:layout_height="match_parent" + android:layout_width="match_parent"> + + <ImageView android:id="@+id/icon" + android:layout_width="@dimen/floating_window_icon" + android:layout_height="@dimen/floating_window_icon" + android:src="@drawable/quick_theme_fab" /> + </FrameLayout> +</FrameLayout>
\ No newline at end of file diff --git a/res/layout/per_app_theme_list.xml b/res/layout/per_app_theme_list.xml new file mode 100644 index 0000000..b3c06f3 --- /dev/null +++ b/res/layout/per_app_theme_list.xml @@ -0,0 +1,29 @@ +<?xml version="1.0" encoding="utf-8"?> +<com.cyngn.theme.perapptheming.PerAppThemeListLayout + xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + android:layout_height="match_parent"> + + <ListView + android:id="@+id/theme_list" + android:layout_width="@dimen/theme_list_width" + android:layout_height="@dimen/theme_list_height" + android:layout_gravity="center_vertical|left" + android:divider="@android:color/transparent" + android:padding="4dp" + 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"/> + + <TextView + android:id="@+id/applying_theme_text" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center" + android:textColor="@color/per_app_theme_list_item_text_color" + android:text="@string/per_app_theme_applying" + android:textSize="16sp" + android:alpha="0"/> + +</com.cyngn.theme.perapptheming.PerAppThemeListLayout>
\ No newline at end of file diff --git a/res/layout/per_app_theme_list_item.xml b/res/layout/per_app_theme_list_item.xml new file mode 100644 index 0000000..a3c665d --- /dev/null +++ b/res/layout/per_app_theme_list_item.xml @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="utf-8"?> +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:orientation="horizontal" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:paddingTop="10dp" + android:paddingBottom="10dp"> + + <TextView android:id="@+id/theme_title" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + android:layout_marginStart="16dp" + android:textSize="16sp" + android:textColor="@color/per_app_theme_list_item_text_color"/> + + <TextView android:id="@+id/selected_indicator" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginEnd="16dp" + android:gravity="right" + android:textSize="16sp" + android:textColor="@color/per_app_theme_list_item_applied_text_color" + android:text="@string/per_app_applied_theme_indicator"/> + +</LinearLayout>
\ No newline at end of file diff --git a/res/layout/shop_themes.xml b/res/layout/shop_themes.xml deleted file mode 100644 index cff413f..0000000 --- a/res/layout/shop_themes.xml +++ /dev/null @@ -1,32 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- - Copyright (C) 2014 Cyanogen, Inc. ---> -<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:id="@+id/shop_themes_layout" - android:orientation="vertical" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_gravity="bottom|center_horizontal" - android:alpha="0"> - - <com.cyngn.theme.widget.LatoTextView - android:id="@+id/shop_themes" - android:layout_width="140dp" - android:layout_height="44dp" - android:layout_marginBottom="@dimen/shop_themes_margin_bottom" - android:layout_gravity="center_horizontal" - android:textSize="14sp" - android:textColor="@color/shop_themes_text_color" - android:textAllCaps="true" - android:gravity="center" - android:hapticFeedbackEnabled="true" - android:text="@string/shop_themes" - android:clickable="true" - android:focusable="true" - android:background="@drawable/shop_themes_bg"/> - - <com.cyngn.theme.widget.NavBarSpace - android:layout_width="match_parent" - android:layout_height="@*android:dimen/navigation_bar_height"/> -</LinearLayout>
\ No newline at end of file diff --git a/res/values/colors.xml b/res/values/colors.xml index 15d86f0..1f86188 100644 --- a/res/values/colors.xml +++ b/res/values/colors.xml @@ -55,4 +55,10 @@ <color name="processing_text_color">#ffffff</color> + <color name="per_app_theme_bg_color">#0fb6df</color> + <color name="per_app_theme_list_item_text_color">#fff</color> + <color name="per_app_theme_list_item_applied_text_color">#80ffffff</color> + <color name="per_app_theme_remove_background_normal">#0fb6df</color> + <color name="per_app_theme_remove_background_hover">#4fdcff</color> + </resources> diff --git a/res/values/dimens.xml b/res/values/dimens.xml index b13a008..7abdd11 100644 --- a/res/values/dimens.xml +++ b/res/values/dimens.xml @@ -67,4 +67,21 @@ <dimen name="shop_themes_margin_bottom">24dp</dimen> + <!-- Per App Theming dimensions --> + <!-- Floating window --> + <dimen name="floating_window_icon">74dp</dimen> + <dimen name="floating_window_button_height">70dp</dimen> + <dimen name="floating_window_delete_box_height">60dp</dimen> + <dimen name="floating_window_delete_box_width">360dp</dimen> + <!-- Theme list --> + <dimen name="theme_list_width">204dp</dimen> + <dimen name="theme_list_height">360dp</dimen> + <dimen name="theme_list_side_margin">16dp</dimen> + <!-- floating window dimens --> + <dimen name="floating_window_margin_vertical">5dp</dimen> + <dimen name="floating_window_margin_horizontal">2dp</dimen> + <dimen name="floating_window_close_animation_distance">200dp</dimen> + <dimen name="floating_window_drag_delta">2dp</dimen> + <dimen name="floating_window_starting_point_y">50dp</dimen> + </resources> diff --git a/res/values/ids.xml b/res/values/ids.xml new file mode 100644 index 0000000..7640198 --- /dev/null +++ b/res/values/ids.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + <item type="id" name="tag_key_holder"/> + <item type="id" name="tag_key_name"/> +</resources>
\ No newline at end of file diff --git a/res/values/strings.xml b/res/values/strings.xml index 44ee514..4437951 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -76,4 +76,10 @@ <string name="legacy_theme_tag_text">!</string> <string name="legacy_theme_warning">NOTE: %s was designed for an older version of CM. You may experience compatibility issues with this theme.</string> + <!-- Per app theming --> + <string name="per_app_theming_title">Quick theme</string> + <string name="per_app_theme_removal_warning">NOTE: Applying a new theme will remove any quick theme customizations.</string> + <string name="per_app_applied_theme_indicator">\u2022</string> + <string name="per_app_theme_applying">Your theme is being applied</string> + </resources> |