Merge "Custom Theme 4/n: icon step screen" into ub-launcher3-master
diff --git a/res/layout/theme_option.xml b/res/layout/theme_option.xml
index 7aa4380..f0c7777 100644
--- a/res/layout/theme_option.xml
+++ b/res/layout/theme_option.xml
@@ -37,37 +37,29 @@
         android:paddingHorizontal="@dimen/option_tile_padding_horizontal"
         android:paddingVertical="@dimen/option_tile_padding_vertical"
         android:background="@drawable/option_border">
-        <TextView
-            android:id="@+id/theme_option_font"
-            android:layout_width="@dimen/theme_option_sample_width"
-            android:layout_height="@dimen/theme_option_sample_height"
-            android:layout_alignParentTop="true"
-            android:layout_alignParentLeft="true"
-            android:gravity="center"
-            android:textSize="@dimen/theme_option_font_text_size"
-            android:text="@string/theme_font_example"/>
-        <ImageView
-            android:id="@+id/theme_option_shape"
-            android:layout_width="@dimen/theme_option_sample_width"
-            android:layout_height="@dimen/theme_option_sample_height"
-            android:layout_alignParentTop="true"
-            android:layout_alignParentRight="true"
-            android:layout_centerVertical="true"
-            android:padding="@dimen/theme_option_sample_padding"/>
-        <ImageView
-            android:id="@+id/theme_option_color"
-            android:layout_width="@dimen/theme_option_sample_width"
-            android:layout_height="@dimen/theme_option_sample_height"
-            android:layout_alignParentBottom="true"
-            android:layout_alignParentLeft="true"
-            android:padding="@dimen/theme_option_sample_padding"
-            android:src="@drawable/option_color"/>
         <ImageView
             android:id="@+id/theme_option_icon"
-            android:layout_width="@dimen/theme_option_sample_width"
-            android:layout_height="@dimen/theme_option_sample_height"
-            android:layout_alignParentBottom="true"
+            android:layout_width="@dimen/theme_option_icon_sample_width"
+            android:layout_height="@dimen/theme_option_icon_sample_height"
+            android:layout_alignParentTop="true"
+            android:layout_alignParentLeft="true"
+            android:layout_margin="@dimen/theme_option_sample_padding"/>
+        <ImageView
+            android:id="@+id/theme_option_shape"
+            android:layout_width="@dimen/theme_option_shape_sample_width"
+            android:layout_height="@dimen/theme_option_shape_sample_height"
             android:layout_alignParentRight="true"
-            android:padding="@dimen/theme_option_sample_padding"/>
+            android:layout_alignBottom="@+id/theme_option_icon"
+            android:layout_marginHorizontal="@dimen/theme_option_sample_padding"/>
+        <TextView
+            android:id="@+id/theme_option_font"
+            android:layout_width="@dimen/theme_option_font_sample_width"
+            android:layout_height="@dimen/theme_option_font_sample_height"
+            android:layout_alignParentBottom="true"
+            android:layout_gravity="center_horizontal"
+            android:gravity="center"
+            android:textSize="@dimen/theme_option_font_text_size"
+            android:letterSpacing=".2"
+            android:text="@string/theme_font_example"/>
     </RelativeLayout>
 </LinearLayout>
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index f80e59d..c81742b 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -36,15 +36,19 @@
     <!-- Dimensions for the customization option tiles -->
     <dimen name="options_container_height">100dp</dimen>
     <dimen name="option_tile_width">72dp</dimen>
-    <dimen name="theme_option_sample_height">23dp</dimen>
-    <dimen name="theme_option_sample_width">23dp</dimen>
-    <dimen name="theme_option_sample_padding">2dp</dimen>
+    <dimen name="theme_option_icon_sample_height">18dp</dimen>
+    <dimen name="theme_option_icon_sample_width">18dp</dimen>
+    <dimen name="theme_option_shape_sample_height">16dp</dimen>
+    <dimen name="theme_option_shape_sample_width">16dp</dimen>
+    <dimen name="theme_option_font_sample_height">16dp</dimen>
+    <dimen name="theme_option_font_sample_width">52dp</dimen>
+    <dimen name="theme_option_sample_padding">5dp</dimen>
     <!-- Note, using dp instead of sp as this is just the "+" symbol, not text -->
     <dimen name="theme_option_add_size">32dp</dimen>
     <dimen name="option_tile_padding_vertical">12dp</dimen>
     <dimen name="option_tile_padding_horizontal">10dp</dimen>
     <!-- Note, using dp instead of sp as this text is more like a "snapshot" of the font -->
-    <dimen name="theme_option_font_text_size">10dp</dimen>
+    <dimen name="theme_option_font_text_size">16dp</dimen>
     <dimen name="theme_option_title_font_text_size">12sp</dimen>
 
     <dimen name="option_tile_margin_horizontal">4dp</dimen>
diff --git a/src/com/android/customization/model/theme/ThemeBundle.java b/src/com/android/customization/model/theme/ThemeBundle.java
index f3ced93..5851a23 100644
--- a/src/com/android/customization/model/theme/ThemeBundle.java
+++ b/src/com/android/customization/model/theme/ThemeBundle.java
@@ -83,13 +83,11 @@
     public void bindThumbnailTile(View view) {
         Resources res = view.getContext().getResources();
 
-        ((ImageView) view.findViewById(R.id.theme_option_color)).setImageTintList(
-                ColorStateList.valueOf(mPreviewInfo.colorAccentLight));
         ((TextView) view.findViewById(R.id.theme_option_font)).setTypeface(
                 mPreviewInfo.headlineFontFamily);
         if (mPreviewInfo.shapeDrawable != null) {
-            ((ShapeDrawable)mPreviewInfo.shapeDrawable).getPaint().setColor(res.getColor(
-                    R.color.shape_thumbnail_color, null));
+            ((ShapeDrawable) mPreviewInfo.shapeDrawable).getPaint().setColor(
+                    mPreviewInfo.colorAccentLight);
             ((ImageView) view.findViewById(R.id.theme_option_shape)).setImageDrawable(
                     mPreviewInfo.shapeDrawable);
         }
diff --git a/src/com/android/customization/picker/theme/ThemeFragment.java b/src/com/android/customization/picker/theme/ThemeFragment.java
index 99deb83..9ad8e84 100644
--- a/src/com/android/customization/picker/theme/ThemeFragment.java
+++ b/src/com/android/customization/picker/theme/ThemeFragment.java
@@ -113,6 +113,7 @@
                     Toast.makeText(getContext(), R.string.applied_theme_msg,
                             Toast.LENGTH_LONG).show();
                     getActivity().finish();
+                    getActivity().overridePendingTransition(R.anim.fade_in, R.anim.fade_out);
                 }
 
                 @Override