Skip to content

Commit

Permalink
always cancel animation if exist
Browse files Browse the repository at this point in the history
  • Loading branch information
Squadzone committed Mar 3, 2013
1 parent 2324a3e commit 902e5c8
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1766,16 +1766,16 @@ private void setLowProfile(final boolean lightsOut, final boolean animate, final

mLowProfile = lightsOut;

if (mNavViewAnim != null) mNavViewAnim.cancel();
if (mLightViewAnim != null) mLightViewAnim.cancel();

if (!animate) {
navButtons.setAlpha(lightsOut ? 0f : 1f);

lowLights.setAlpha(lightsOut ? 1f : 0f);
lowLights.setVisibility(lightsOut ? View.VISIBLE : View.GONE);
if (lightsOut) lowLights.setOnTouchListener(mLightsOutListener);
} else {
if (mNavViewAnim != null) mNavViewAnim.cancel();
if (mLightViewAnim != null) mLightViewAnim.cancel();

mNavViewAnim = start(ObjectAnimator.ofFloat(navButtons, "alpha", lightsOut ? 1f : 0f, lightsOut ? 0f : 1f)
.setDuration(lightsOut ? 600 : 200));

Expand Down

0 comments on commit 902e5c8

Please sign in to comment.