Loading packages/SystemUI/res/layout/qs_tile_label.xml +0 −1 Original line number Diff line number Diff line Loading @@ -41,7 +41,6 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:clickable="false" android:maxLines="2" android:padding="0dp" android:gravity="center" android:ellipsize="marquee" Loading packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSTileView.java +5 −3 Original line number Diff line number Diff line Loading @@ -36,6 +36,7 @@ import java.util.Objects; /** View that represents a standard quick settings tile. **/ public class QSTileView extends QSTileBaseView { private static final int MAX_LABEL_LINES = 2; private static final boolean DUAL_TARGET_ALLOWED = false; private View mDivider; protected TextView mLabel; Loading Loading @@ -98,8 +99,9 @@ public class QSTileView extends QSTileBaseView { protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { super.onMeasure(widthMeasureSpec, heightMeasureSpec); // Remeasure view if the secondary label text will be cut off. if (!TextUtils.isEmpty(mSecondLine.getText()) // Remeasure view if the primary label requires more then 2 lines or the secondary label // text will be cut off. if (mLabel.getLineCount() > MAX_LABEL_LINES || !TextUtils.isEmpty(mSecondLine.getText()) && mSecondLine.getLineHeight() > mSecondLine.getHeight()) { mLabel.setSingleLine(); super.onMeasure(widthMeasureSpec, heightMeasureSpec); Loading Loading
packages/SystemUI/res/layout/qs_tile_label.xml +0 −1 Original line number Diff line number Diff line Loading @@ -41,7 +41,6 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:clickable="false" android:maxLines="2" android:padding="0dp" android:gravity="center" android:ellipsize="marquee" Loading
packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSTileView.java +5 −3 Original line number Diff line number Diff line Loading @@ -36,6 +36,7 @@ import java.util.Objects; /** View that represents a standard quick settings tile. **/ public class QSTileView extends QSTileBaseView { private static final int MAX_LABEL_LINES = 2; private static final boolean DUAL_TARGET_ALLOWED = false; private View mDivider; protected TextView mLabel; Loading Loading @@ -98,8 +99,9 @@ public class QSTileView extends QSTileBaseView { protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { super.onMeasure(widthMeasureSpec, heightMeasureSpec); // Remeasure view if the secondary label text will be cut off. if (!TextUtils.isEmpty(mSecondLine.getText()) // Remeasure view if the primary label requires more then 2 lines or the secondary label // text will be cut off. if (mLabel.getLineCount() > MAX_LABEL_LINES || !TextUtils.isEmpty(mSecondLine.getText()) && mSecondLine.getLineHeight() > mSecondLine.getHeight()) { mLabel.setSingleLine(); super.onMeasure(widthMeasureSpec, heightMeasureSpec); Loading