From 5272b1cfd61efdf7b18ac033ba9ee657b73d2d3b Mon Sep 17 00:00:00 2001 From: Roozbeh Pournader Date: Wed, 25 May 2016 14:33:20 -0700 Subject: [PATCH] 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 --- res/layout/dashboard_tile.xml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/res/layout/dashboard_tile.xml b/res/layout/dashboard_tile.xml index fa7a63bde02..a588ed4bbab 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" />