summaryrefslogtreecommitdiffstats
path: root/packages/SystemUI/src/com/android/systemui/statusbar/phone
diff options
context:
space:
mode:
authorDanesh Mondegarian <daneshm90@gmail.com>2013-01-08 16:34:21 -0500
committerDanesh Mondegarian <daneshm90@gmail.com>2013-01-08 16:34:21 -0500
commit311f039c0ef6001a7b067d11c4fff4bf30bc0873 (patch)
treee75b7a8e67c9431bebecbca8038a3f696fa5af7c /packages/SystemUI/src/com/android/systemui/statusbar/phone
parentde52bdcc20dd279e6752b63383f0bb6194695ead (diff)
downloadframeworks_base-311f039c0ef6001a7b067d11c4fff4bf30bc0873.zip
frameworks_base-311f039c0ef6001a7b067d11c4fff4bf30bc0873.tar.gz
frameworks_base-311f039c0ef6001a7b067d11c4fff4bf30bc0873.tar.bz2
Navbar : Padding fix
Fix padding calculation Change-Id: I5262266c99ab4779252264474e94f033304f6fe5
Diffstat (limited to 'packages/SystemUI/src/com/android/systemui/statusbar/phone')
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/NavbarEditor.java30
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);
}
}
}