Clock text adjustment for large text (2/2)
Set clock text to be max 2 lines, and hyphenate. Also added changes
to re-render the preview when surface view sizing changes, because when
properties to adjust the number of lines of text is added to a TextView,
the layout re-sizes itself, but the preview does not re-render and
creates an incorrect cropping.
Bug: 278665088
Test: Manually verified, see comment
Change-Id: Ie1c2fd546055d34b79632a68bae5f74ae5741b1e
diff --git a/res/layout/clock_color_option.xml b/res/layout/clock_color_option.xml
index f27c13d..786d633 100644
--- a/res/layout/clock_color_option.xml
+++ b/res/layout/clock_color_option.xml
@@ -30,8 +30,11 @@
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/option_bottom_margin"
android:textColor="@color/text_color_primary"
+ android:maxLines="2"
+ android:hyphenationFrequency="normal"
+ android:ellipsize="end"
android:visibility="invisible"
- android:gravity="center"
+ android:gravity="center_horizontal"
android:text="Placeholder for stable size calculation, please do not remove."
tools:ignore="HardcodedText" />
</LinearLayout>