diff options
author | Jason Monk <jmonk@google.com> | 2015-02-05 11:54:58 -0500 |
---|---|---|
committer | Jason Monk <jmonk@google.com> | 2015-02-05 11:54:58 -0500 |
commit | 867874b06a5918d727838e6b3d77e8c3f62df300 (patch) | |
tree | e9cecef12ac1ebd2c8dfb7598be0c9c0da9a0831 /packages | |
parent | 8d12d3da15a92fde05256c51f8a3085ab9399c0f (diff) | |
download | frameworks_base-867874b06a5918d727838e6b3d77e8c3f62df300.zip frameworks_base-867874b06a5918d727838e6b3d77e8c3f62df300.tar.gz frameworks_base-867874b06a5918d727838e6b3d77e8c3f62df300.tar.bz2 |
Ellipsize QS detail items when needed
Bug: 19262637
Change-Id: I395125a7c00e558e914aff9cf9c48a363435a9b2
Diffstat (limited to 'packages')
-rw-r--r-- | packages/SystemUI/res/layout/qs_detail_item.xml | 3 | ||||
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/qs/QSDetailItems.java | 1 |
2 files changed, 3 insertions, 1 deletions
diff --git a/packages/SystemUI/res/layout/qs_detail_item.xml b/packages/SystemUI/res/layout/qs_detail_item.xml index ea2e1e1..0ba3ba3 100644 --- a/packages/SystemUI/res/layout/qs_detail_item.xml +++ b/packages/SystemUI/res/layout/qs_detail_item.xml @@ -39,6 +39,7 @@ android:id="@android:id/title" android:layout_width="match_parent" android:layout_height="wrap_content" + android:ellipsize="end" android:textAppearance="@style/TextAppearance.QS.DetailItemPrimary" /> <TextView @@ -58,4 +59,4 @@ android:scaleType="center" android:src="@drawable/ic_qs_cancel" /> -</LinearLayout>
\ No newline at end of file +</LinearLayout> diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSDetailItems.java b/packages/SystemUI/src/com/android/systemui/qs/QSDetailItems.java index 9155102..95ac558 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/QSDetailItems.java +++ b/packages/SystemUI/src/com/android/systemui/qs/QSDetailItems.java @@ -190,6 +190,7 @@ public class QSDetailItems extends FrameLayout { title.setText(item.line1); final TextView summary = (TextView) view.findViewById(android.R.id.summary); final boolean twoLines = !TextUtils.isEmpty(item.line2); + title.setMaxLines(twoLines ? 1 : 2); summary.setVisibility(twoLines ? VISIBLE : GONE); summary.setText(twoLines ? item.line2 : null); view.setMinimumHeight(mContext.getResources() .getDimensionPixelSize( |