diff options
author | Selim Cinek <cinek@google.com> | 2014-09-10 14:41:58 +0200 |
---|---|---|
committer | Selim Cinek <cinek@google.com> | 2014-09-10 14:41:58 +0200 |
commit | e84e6676c42dae85666947b0d658e76059dcba3a (patch) | |
tree | 82ed13091a09ef6762f42259f253a618539a53c9 /packages/SystemUI/src/com/android/systemui/qs/QSDualTileLabel.java | |
parent | 51ae05d92047049250ddbfd6c4998cb7cbca017d (diff) | |
download | frameworks_base-e84e6676c42dae85666947b0d658e76059dcba3a.zip frameworks_base-e84e6676c42dae85666947b0d658e76059dcba3a.tar.gz frameworks_base-e84e6676c42dae85666947b0d658e76059dcba3a.tar.bz2 |
Fixed a bug where text could overlap in Quick settings
Bug: 17434395
Change-Id: I001f54586666e2e575b0295315f7b2181c25a1e9
Diffstat (limited to 'packages/SystemUI/src/com/android/systemui/qs/QSDualTileLabel.java')
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/qs/QSDualTileLabel.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSDualTileLabel.java b/packages/SystemUI/src/com/android/systemui/qs/QSDualTileLabel.java index 377fcc0..cd6137e 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/QSDualTileLabel.java +++ b/packages/SystemUI/src/com/android/systemui/qs/QSDualTileLabel.java @@ -23,7 +23,6 @@ import android.text.TextUtils; import android.text.TextUtils.TruncateAt; import android.view.Gravity; import android.view.View; -import android.widget.FrameLayout; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; @@ -41,7 +40,7 @@ import java.util.Objects; * truncate. * Second line: ellipsis if necessary */ -public class QSDualTileLabel extends FrameLayout { +public class QSDualTileLabel extends LinearLayout { private final Context mContext; private final TextView mFirstLine; @@ -54,6 +53,7 @@ public class QSDualTileLabel extends FrameLayout { public QSDualTileLabel(Context context) { super(context); mContext = context; + setOrientation(LinearLayout.VERTICAL); mHorizontalPaddingPx = mContext.getResources() .getDimensionPixelSize(R.dimen.qs_dual_tile_padding_horizontal); @@ -70,13 +70,13 @@ public class QSDualTileLabel extends FrameLayout { mFirstLineCaret.setScaleType(ImageView.ScaleType.MATRIX); mFirstLineCaret.setClickable(false); firstLineLayout.addView(mFirstLineCaret); - addView(firstLineLayout, newFrameLayoutParams()); + addView(firstLineLayout, newLinearLayoutParams()); mSecondLine = initTextView(); mSecondLine.setPadding(mHorizontalPaddingPx, 0, mHorizontalPaddingPx, 0); mSecondLine.setEllipsize(TruncateAt.END); mSecondLine.setVisibility(GONE); - addView(mSecondLine, newFrameLayoutParams()); + addView(mSecondLine, newLinearLayoutParams()); addOnLayoutChangeListener(new OnLayoutChangeListener() { @Override @@ -89,7 +89,7 @@ public class QSDualTileLabel extends FrameLayout { }); } - private static LayoutParams newFrameLayoutParams() { + private static LayoutParams newLinearLayoutParams() { final LayoutParams lp = new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT); lp.gravity = Gravity.CENTER_HORIZONTAL; |