diff options
author | Danesh Mondegarian <daneshm90@gmail.com> | 2013-01-09 07:08:01 -0800 |
---|---|---|
committer | Gerrit Code Review <gerrit@review.cyanogenmod.com> | 2013-01-09 07:08:01 -0800 |
commit | 1f0e2706a6da0889b6220ac970489b03a20bca3b (patch) | |
tree | e8e5c9b8273013a64e6293c190455f41843cda9a /packages/SystemUI/src/com/android/systemui/statusbar/phone | |
parent | 5f0091368d31ebe39b3196f9950d16a3fdcd6d48 (diff) | |
parent | 311f039c0ef6001a7b067d11c4fff4bf30bc0873 (diff) | |
download | frameworks_base-1f0e2706a6da0889b6220ac970489b03a20bca3b.zip frameworks_base-1f0e2706a6da0889b6220ac970489b03a20bca3b.tar.gz frameworks_base-1f0e2706a6da0889b6220ac970489b03a20bca3b.tar.bz2 |
Merge "Navbar : Padding fix" into cm-10.1
Diffstat (limited to 'packages/SystemUI/src/com/android/systemui/statusbar/phone')
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/phone/NavbarEditor.java | 30 |
1 files changed, 20 insertions, 10 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavbarEditor.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavbarEditor.java index 345970b..e245343 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavbarEditor.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavbarEditor.java @@ -363,18 +363,28 @@ public class NavbarEditor implements OnTouchListener { int sCount = visibleCount; for (int v = 0; v < viewParent.getChildCount();v++) { View cView = viewParent.getChildAt(v); - if (NavigationBarView.getEditMode()) { - cView.setVisibility(View.VISIBLE); - } else if (cView instanceof KeyButtonView) { + if (cView instanceof KeyButtonView) { View nextPadding = viewParent.getChildAt(v+1); - String curTag = (String) cView.getTag(); - if (curTag == null || curTag.equals(NAVBAR_EMPTY)) { - cView.setVisibility(View.GONE); - if (nextPadding != null) { - nextPadding.setVisibility(View.GONE); + if (nextPadding != null) { + View nextKey = viewParent.getChildAt(v+2); + String nextTag = NAVBAR_EMPTY; + if (nextKey != null) { + nextTag = (String) nextKey.getTag(); + } + String curTag = (String) cView.getTag(); + if (nextKey != null && nextTag != null && curTag != null && !curTag.equals(NAVBAR_EMPTY)) { + if (!nextTag.equals(NAVBAR_EMPTY)){ + nextPadding.setVisibility(View.VISIBLE); + } else { + if (sCount > 1) { + nextPadding.setVisibility(View.VISIBLE); + } else { + nextPadding.setVisibility(View.GONE); + } + } + sCount--; } else { - View prevPadding = viewParent.getChildAt(v-1); - prevPadding.setVisibility(View.GONE); + nextPadding.setVisibility(View.GONE); } } } |