summaryrefslogtreecommitdiffstats
path: root/packages/SystemUI/src/com
diff options
context:
space:
mode:
authorJorim Jaggi <jjaggi@google.com>2014-10-17 18:43:43 +0200
committerJorim Jaggi <jjaggi@google.com>2014-10-17 18:43:43 +0200
commit6d035f15d5c8c67d97a4d5b6ed44f8cca0772e1f (patch)
treefce746dc6abbc9cff590cb8dd7f33893236c7ade /packages/SystemUI/src/com
parent09e9dd261367ef443cfb46d79043e6f220e51bb3 (diff)
downloadframeworks_base-6d035f15d5c8c67d97a4d5b6ed44f8cca0772e1f.zip
frameworks_base-6d035f15d5c8c67d97a4d5b6ed44f8cca0772e1f.tar.gz
frameworks_base-6d035f15d5c8c67d97a4d5b6ed44f8cca0772e1f.tar.bz2
Fix padding between battery and system icons
The padding was wrong when nothing from the signal cluster view was visible. Now the padding between battery/signal cluster is modified when nothing is visible to fix this issue. Bug: 17585428 Change-Id: I10f7e42ed029aab7453cbc227188bdf99f414677
Diffstat (limited to 'packages/SystemUI/src/com')
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/SignalClusterView.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/SignalClusterView.java b/packages/SystemUI/src/com/android/systemui/statusbar/SignalClusterView.java
index 4f82f66..9154a48 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/SignalClusterView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/SignalClusterView.java
@@ -57,6 +57,8 @@ public class SignalClusterView
View mWifiSignalSpacer;
private int mWideTypeIconStartPadding;
+ private int mEndPadding;
+ private int mEndPaddingNothingVisible;
public SignalClusterView(Context context) {
this(context, null);
@@ -87,6 +89,10 @@ public class SignalClusterView
super.onFinishInflate();
mWideTypeIconStartPadding = getContext().getResources().getDimensionPixelSize(
R.dimen.wide_type_icon_start_padding);
+ mEndPadding = getContext().getResources().getDimensionPixelSize(
+ R.dimen.signal_cluster_battery_padding);
+ mEndPaddingNothingVisible = getContext().getResources().getDimensionPixelSize(
+ R.dimen.no_signal_cluster_battery_padding);
}
@Override
@@ -255,6 +261,9 @@ public class SignalClusterView
mMobileStrengthId, mMobileTypeId));
mMobileType.setVisibility(mMobileTypeId != 0 ? View.VISIBLE : View.GONE);
+
+ boolean anythingVisible = mWifiVisible || mIsAirplaneMode || mMobileVisible || mVpnVisible;
+ setPaddingRelative(0, 0, anythingVisible ? mEndPadding : mEndPaddingNothingVisible, 0);
}
}