Force dashboard summary to single-line and ellipsize it
Previously, the summary could become multiline. In rare combinations
of text and screen width, to indicate to the user that the text is
cut, we now ellipsize it too. Finally, since the ellipsis can get
too close to the end of the line, we add a padding equal to the left
margin of the icon.
Bug: 28872122
Change-Id: I27226e5de7781cf096508ddbef4f9095961ce028
diff --git a/res/layout/dashboard_tile.xml b/res/layout/dashboard_tile.xml
index fa7a63b..a588ed4 100644
--- a/res/layout/dashboard_tile.xml
+++ b/res/layout/dashboard_tile.xml
@@ -51,7 +51,10 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="@style/TextAppearance.Small"
- android:textColor="?android:attr/textColorSecondary" />
+ android:textColor="?android:attr/textColorSecondary"
+ android:maxLines="1"
+ android:ellipsize="end"
+ android:paddingEnd="@dimen/dashboard_tile_image_margin_start" />
</LinearLayout>