summaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authorClark Scheff <clark@cyngn.com>2014-07-16 16:53:08 -0700
committerd34d <clark@cyngn.com>2014-07-17 08:29:28 -0700
commitaccf71cc2f859c8c8d241e7f67fe118ac82bf6f5 (patch)
treef65476e4165b18d419e29ae6bab7b22bd0ccc893 /res
parente8e880c66ba2734cf1f5101ca2d3f19658b55bf0 (diff)
downloadpackages_apps_ThemeChooser-accf71cc2f859c8c8d241e7f67fe118ac82bf6f5.zip
packages_apps_ThemeChooser-accf71cc2f859c8c8d241e7f67fe118ac82bf6f5.tar.gz
packages_apps_ThemeChooser-accf71cc2f859c8c8d241e7f67fe118ac82bf6f5.tar.bz2
Add applying theme progress along with animations.
Change-Id: Id7835d3be0b9d9c8d861e820e63b45e17235ef68
Diffstat (limited to 'res')
-rw-r--r--res/drawable/apply_progress_background.xml8
-rw-r--r--res/drawable/apply_progress_bar.xml12
-rw-r--r--res/drawable/apply_progress_indicator.xml8
-rw-r--r--res/layout/v2_fragment_pager_list.xml67
-rw-r--r--res/values/colors.xml3
-rw-r--r--res/values/dimens.xml1
6 files changed, 74 insertions, 25 deletions
diff --git a/res/drawable/apply_progress_background.xml b/res/drawable/apply_progress_background.xml
new file mode 100644
index 0000000..47c2530
--- /dev/null
+++ b/res/drawable/apply_progress_background.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+ android:shape="rectangle">
+
+ <solid android:color="@color/apply_progress_background_color" />
+
+</shape> \ No newline at end of file
diff --git a/res/drawable/apply_progress_bar.xml b/res/drawable/apply_progress_bar.xml
new file mode 100644
index 0000000..a3cbc6f
--- /dev/null
+++ b/res/drawable/apply_progress_bar.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <item android:id="@android:id/background"
+ android:drawable="@drawable/apply_progress_background"/>
+
+ <item android:id="@android:id/progress">
+ <clip android:drawable="@drawable/apply_progress_indicator"/>
+ </item>
+
+</layer-list> \ No newline at end of file
diff --git a/res/drawable/apply_progress_indicator.xml b/res/drawable/apply_progress_indicator.xml
new file mode 100644
index 0000000..0f332ed
--- /dev/null
+++ b/res/drawable/apply_progress_indicator.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+ android:shape="rectangle">
+
+ <solid android:color="@color/apply_progress_color" />
+
+</shape> \ No newline at end of file
diff --git a/res/layout/v2_fragment_pager_list.xml b/res/layout/v2_fragment_pager_list.xml
index 70c1b3c..fc3c26e 100644
--- a/res/layout/v2_fragment_pager_list.xml
+++ b/res/layout/v2_fragment_pager_list.xml
@@ -40,39 +40,56 @@
<include layout="@layout/v2_nav_bar_preview_item"/>
</RelativeLayout>
</FrameLayout>
- <RelativeLayout
+ <FrameLayout
android:id="@+id/title_card"
- android:layout_below="@id/shadow_frame"
android:layout_width="@dimen/theme_preview_width"
android:layout_height="48dp"
+ android:layout_below="@id/shadow_frame"
android:layout_centerHorizontal="true"
android:background="@drawable/card_themepreview_bg">
- <TextView
- android:id="@+id/title"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:layout_alignParentLeft="true"
- android:layout_marginStart="16dp"
- android:gravity="center"
- android:ellipsize="end"
- android:textColor="#78000000"/>
+ <RelativeLayout
+ android:id="@+id/title_layout"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
+ <TextView
+ android:id="@+id/title"
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent"
+ android:layout_alignParentLeft="true"
+ android:layout_marginStart="16dp"
+ android:gravity="center"
+ android:ellipsize="end"
+ android:textColor="#78000000"/>
- <ImageView
- android:id="@+id/apply"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:layout_toLeftOf="@+id/overflow"
- android:layout_marginRight="16dp"
- android:src="@drawable/ic_theme_apply2"/>
+ <ImageView
+ android:id="@+id/apply"
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent"
+ android:layout_toLeftOf="@+id/overflow"
+ android:layout_marginRight="16dp"
+ android:src="@drawable/ic_theme_apply2"/>
- <ImageView
- android:id="@+id/overflow"
- android:layout_width="wrap_content"
+ <ImageView
+ android:id="@+id/overflow"
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent"
+ android:layout_alignParentRight="true"
+ android:layout_marginRight="8dp"
+ android:src="@drawable/ic_overflow_dark"/>
+ </RelativeLayout>
+ <ProgressBar
+ android:id="@+id/apply_progress"
+ android:layout_width="match_parent"
android:layout_height="match_parent"
- android:layout_alignParentRight="true"
- android:layout_marginRight="8dp"
- android:src="@drawable/ic_overflow_dark"/>
- </RelativeLayout>
+ android:layout_gravity="center_vertical|right"
+ android:padding="@dimen/apply_progress_padding"
+ android:indeterminate="false"
+ android:max="100"
+ android:progress="0"
+ android:progressDrawable="@drawable/apply_progress_bar"
+ android:visibility="gone"
+ style="@android:style/Widget.ProgressBar.Horizontal"/>
+ </FrameLayout>
</RelativeLayout>
</ScrollView>
</LinearLayout> \ No newline at end of file
diff --git a/res/values/colors.xml b/res/values/colors.xml
index c25d282..cdc1eca 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -41,4 +41,7 @@
<drawable name="save_apply_button_normal">#cd00b3e6</drawable>
<drawable name="save_apply_button_focused">#cd1fcdff</drawable>
<drawable name="save_apply_button_pressed">#cd0093bd</drawable>
+
+ <color name="apply_progress_background_color">#e0dfe1</color>
+ <color name="apply_progress_color">#00b3e6</color>
</resources>
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index a6586ed..346c22f 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -65,4 +65,5 @@
<dimen name="icon_component_margin">4dp</dimen>
<dimen name="content_offset_padding">10dp</dimen>
+ <dimen name="apply_progress_padding">10dp</dimen>
</resources>