Skip to content

Commit 291c6d7

Browse files
dsandlerAndroid (Google) Code Review
authored andcommitted
Merge "Fix disappearing nav icons."
2 parents 0559e61 + f0e8daa commit 291c6d7

1 file changed

Lines changed: 12 additions & 4 deletions

File tree

packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -160,18 +160,26 @@ public void setLowProfile(final boolean lightsOut, final boolean animate, final
160160
final View navButtons = mCurrentView.findViewById(R.id.nav_buttons);
161161
final View lowLights = mCurrentView.findViewById(R.id.lights_out);
162162

163+
// ok, everyone, stop it right there
164+
navButtons.animate().cancel();
165+
lowLights.animate().cancel();
166+
163167
if (!animate) {
164-
lowLights.setVisibility(View.GONE);
165-
navButtons.setAlpha(1f);
168+
navButtons.setAlpha(lightsOut ? 0f : 1f);
169+
170+
lowLights.setAlpha(lightsOut ? 1f : 0f);
171+
lowLights.setVisibility(lightsOut ? View.VISIBLE : View.GONE);
166172
} else {
167173
navButtons.animate()
168174
.alpha(lightsOut ? 0f : 1f)
169175
.setDuration(lightsOut ? 600 : 200)
170176
.start();
171177

172178
lowLights.setOnTouchListener(mLightsOutListener);
173-
lowLights.setAlpha(0f);
174-
lowLights.setVisibility(View.VISIBLE);
179+
if (lowLights.getVisibility() == View.GONE) {
180+
lowLights.setAlpha(0f);
181+
lowLights.setVisibility(View.VISIBLE);
182+
}
175183
lowLights.animate()
176184
.alpha(lightsOut ? 1f : 0f)
177185
.setStartDelay(lightsOut ? 500 : 0)

0 commit comments

Comments
 (0)