diff options
| author | Jason Monk <jmonk@google.com> | 2015-02-05 23:02:57 +0000 |
|---|---|---|
| committer | android-build-merger <android-build-merger@google.com> | 2015-02-05 23:02:57 +0000 |
| commit | ba87ba5e4cc929f34921ff9fa875c38eca2bc1d0 (patch) | |
| tree | afdf898fd8fe7b0b17e43c57d639fee459723837 | |
| parent | 00a1fa3e433d333c58156ff4f1ede086b6ab0a09 (diff) | |
| parent | 6d72d46b4b6fe0ec72c24ea5369c6d92fd29ba52 (diff) | |
am 3bbc5a11: Merge "Ellipsize QS detail items when needed" into lmp-mr1-dev
automerge: 6d72d46
* commit '6d72d46b4b6fe0ec72c24ea5369c6d92fd29ba52':
Ellipsize QS detail items when needed
| -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 ea2e1e1c3c8a..0ba3ba381338 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 9155102351cd..95ac5584129a 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( |
