From 4cea3b4bd1dcddf1d12dcefd15544af6ba55acca Mon Sep 17 00:00:00 2001 From: Daniel Sandler Date: Tue, 20 Sep 2011 10:44:59 -0400 Subject: [PATCH] Fix disappearing nav icons. (DO NOT MERGE) Bug: 5328284 Change-Id: Iaa20454cff9f5a340da7b0c71190796445e8a205 --- .../statusbar/phone/NavigationBarView.java | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java index 610edfa4b21f2..bf48e9f0ff402 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java @@ -143,9 +143,15 @@ public class NavigationBarView extends LinearLayout { final View navButtons = mCurrentView.findViewById(R.id.nav_buttons); final View lowLights = mCurrentView.findViewById(R.id.lights_out); + // ok, everyone, stop it right there + navButtons.animate().cancel(); + lowLights.animate().cancel(); + if (!animate) { - lowLights.setVisibility(View.GONE); - navButtons.setAlpha(1f); + navButtons.setAlpha(lightsOut ? 0f : 1f); + + lowLights.setAlpha(lightsOut ? 1f : 0f); + lowLights.setVisibility(lightsOut ? View.VISIBLE : View.GONE); } else { navButtons.animate() .alpha(lightsOut ? 0f : 1f) @@ -153,8 +159,10 @@ public class NavigationBarView extends LinearLayout { .start(); lowLights.setOnTouchListener(mLightsOutListener); - lowLights.setAlpha(0f); - lowLights.setVisibility(View.VISIBLE); + if (lowLights.getVisibility() == View.GONE) { + lowLights.setAlpha(0f); + lowLights.setVisibility(View.VISIBLE); + } lowLights.animate() .alpha(lightsOut ? 1f : 0f) .setStartDelay(lightsOut ? 500 : 0)