Various theme picker fixes.
- Add Previous button to custom flow
- Seed custom flow with the currently applied bundled theme
- Use add drawable icon instead of text
- Add padding between checkbox and "Add current wallpaper"
- Show ripple background on "Tap to edit"
Fixes: 130763331
Fixes: 130753131
Fixes: 130761402
Fixes: 130759176
Bug: 130759508
Test: visual
Change-Id: Ia82344befe8ac45489646d840453a71e31c83eae
diff --git a/res/drawable/ic_add_24px.xml b/res/drawable/ic_add_24px.xml
new file mode 100644
index 0000000..50df565
--- /dev/null
+++ b/res/drawable/ic_add_24px.xml
@@ -0,0 +1,10 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M20,13h-7v7h-2v-7H4v-2h7V4h2v7h7V13z"/>
+</vector>
+
diff --git a/res/layout/activity_custom_theme.xml b/res/layout/activity_custom_theme.xml
index 82b7887..b2aaa73 100644
--- a/res/layout/activity_custom_theme.xml
+++ b/res/layout/activity_custom_theme.xml
@@ -35,6 +35,13 @@
android:layout_height="@dimen/custom_theme_nav_height"
android:layout_marginHorizontal="12dp">
<Button
+ android:id="@+id/previous_button"
+ style="@style/ActionSecondaryButton"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="start|center_vertical"
+ android:text="@string/custom_theme_previous"/>
+ <Button
android:id="@+id/next_button"
style="@style/ActionPrimaryButton"
android:layout_width="wrap_content"
diff --git a/res/layout/custom_theme_option.xml b/res/layout/custom_theme_option.xml
index b249555..09bd58e 100644
--- a/res/layout/custom_theme_option.xml
+++ b/res/layout/custom_theme_option.xml
@@ -34,13 +34,11 @@
android:paddingHorizontal="@dimen/option_tile_padding_horizontal"
android:paddingVertical="@dimen/option_tile_padding_vertical"
android:background="@drawable/option_border">
- <TextView
+ <ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
- android:textSize="@dimen/theme_option_add_size"
- android:textAlignment="center"
- android:textColor="?android:colorAccent"
- android:text="@string/add_custom_theme"/>
+ android:src="@drawable/ic_add_24px"
+ android:tint="?android:attr/colorAccent" />
</FrameLayout>
</LinearLayout>
diff --git a/res/layout/fragment_theme_picker.xml b/res/layout/fragment_theme_picker.xml
index ffc2d7b..c73bf63 100644
--- a/res/layout/fragment_theme_picker.xml
+++ b/res/layout/fragment_theme_picker.xml
@@ -51,6 +51,7 @@
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_centerVertical="true"
+ android:paddingLeft="4dp"
android:minHeight="@dimen/min_taptarget_height"
android:text="@string/keep_my_wallpaper"/>
<Button
diff --git a/res/layout/theme_preview_card.xml b/res/layout/theme_preview_card.xml
index 277a739..deccd48 100644
--- a/res/layout/theme_preview_card.xml
+++ b/res/layout/theme_preview_card.xml
@@ -65,10 +65,9 @@
android:layout_gravity="center_horizontal"
android:drawableStart="@drawable/ic_tune_24px"
android:drawablePadding="8dp"
- android:drawableTint="?android:colorAccent"
android:gravity="center"
android:text="@string/edit_custom_theme_lbl"
- android:textAppearance="@style/EditLabelTextAppearance"
+ style="@style/EditLabelStyle"
android:visibility="invisible"/>
</LinearLayout>
</FrameLayout>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 0723542..75bd9a6 100755
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -105,6 +105,10 @@
[CHAR LIMIT=20] -->
<string name="custom_theme_next">Next</string>
+ <!-- Label for a button that takes the user back to the previous step when configuring a custom theme.
+ [CHAR LIMIT=20] -->
+ <string name="custom_theme_previous">Previous</string>
+
<!-- Label for a system Style/Theme (combination of fonts/colors/icons) that is defined and
customized by the user [CHAR LIMIT=15] -->
<string name="custom_theme_title">Custom</string>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 1b69e3d..dd44a91 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -58,6 +58,8 @@
<style name="ActionPrimaryButton" parent="android:Widget.DeviceDefault.Button.Colored"/>
+ <style name="ActionSecondaryButton" parent="android:Widget.DeviceDefault.Button.Borderless.Colored"/>
+
<style name="OptionTitleTextAppearance" parent="@android:style/TextAppearance.DeviceDefault.Widget.ActionBar.Title">
<item name="android:textColor">@color/option_title_color</item>
<item name="android:textAlignment">center</item>
@@ -100,7 +102,7 @@
<style name="ComponentCounterTextAppearance" parent="@android:style/TextAppearance.DeviceDefault"/>
- <style name="EditLabelTextAppearance" parent="@android:style/TextAppearance.DeviceDefault">
- <item name="android:textColor">?android:colorAccent</item>
+ <style name="EditLabelStyle" parent="@style/ActionSecondaryButton">
+ <item name="android:textAppearance">@android:style/TextAppearance.DeviceDefault</item>
</style>
</resources>