Allow resizing text sample in style thumbnail

Different fonts get truncated with the current size in
smaller screens, so we're using autosize to make it fit
when needed.

Fixes: 143712313
Change-Id: I53a0cb7704ce50dcce97487c3da886a75b7a6d07
diff --git a/res/layout/theme_option.xml b/res/layout/theme_option.xml
index e103b69..98fae71 100644
--- a/res/layout/theme_option.xml
+++ b/res/layout/theme_option.xml
@@ -62,9 +62,13 @@
             android:layout_height="@dimen/theme_option_font_sample_height"
             android:layout_alignParentBottom="true"
             android:layout_gravity="center_horizontal"
+            android:autoSizeMaxTextSize="@dimen/theme_option_font_text_size"
+            android:autoSizeMinTextSize="@dimen/theme_option_font_min_text_size"
+            android:autoSizeTextType="uniform"
             android:gravity="center"
-            android:textSize="@dimen/theme_option_font_text_size"
             android:letterSpacing=".2"
-            android:text="@string/theme_font_example"/>
+            android:text="@string/theme_font_example"
+            android:textAlignment="center"
+            android:textSize="@dimen/theme_option_font_text_size" />
     </RelativeLayout>
 </LinearLayout>
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index a2cb88b..f7d435c 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -56,6 +56,7 @@
     <dimen name="option_bottom_margin">8dp</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">16dp</dimen>
+    <dimen name="theme_option_font_min_text_size">15dp</dimen>
     <dimen name="theme_option_title_font_text_size">12sp</dimen>
 
     <dimen name="option_tile_margin_horizontal">6dp</dimen>