Guarantee views are invisible after being faded (issue 11112570)

-> Prevent clicking of hotseat items during non-normal state
-> Update folder text edit highlight color (issue 11072862)

Change-Id: I0292b51dc5f7e318dc59e9a26bf1e39f333bc8eb
This commit is contained in:
Adam Cohen
2013-10-11 12:10:28 -07:00
parent f7d458543e
commit a5f4e488df
3 changed files with 37 additions and 7 deletions

View File

@@ -17,6 +17,7 @@
package com.android.launcher3;
import android.animation.Animator;
import android.animation.Animator.AnimatorListener;
import android.animation.AnimatorListenerAdapter;
import android.animation.AnimatorSet;
import android.animation.LayoutTransition;
@@ -2058,15 +2059,14 @@ public class Workspace extends SmoothPagedView
ObjectAnimator overviewPanelAlpha = ObjectAnimator.ofFloat(overviewPanel,
"alpha", finalOverviewPanelAlpha);
overviewPanelAlpha.addUpdateListener(new AlphaUpdateListener(overviewPanel));
hotseatAlpha.addUpdateListener(new AlphaUpdateListener(hotseat));
searchBarAlpha.addUpdateListener(new AlphaUpdateListener(searchBar));
overviewPanelAlpha.addListener(new AlphaUpdateListener(overviewPanel));
hotseatAlpha.addListener(new AlphaUpdateListener(hotseat));
searchBarAlpha.addListener(new AlphaUpdateListener(searchBar));
if (getPageIndicator() != null) {
pageIndicatorAlpha.addUpdateListener(new AlphaUpdateListener(getPageIndicator()));
pageIndicatorAlpha.addListener(new AlphaUpdateListener(getPageIndicator()));
}
anim.play(overviewPanelAlpha);
anim.play(hotseatAlpha);
anim.play(searchBarAlpha);
@@ -2106,7 +2106,7 @@ public class Workspace extends SmoothPagedView
return anim;
}
static class AlphaUpdateListener implements AnimatorUpdateListener {
static class AlphaUpdateListener implements AnimatorUpdateListener, AnimatorListener {
View view;
public AlphaUpdateListener(View v) {
view = v;
@@ -2128,6 +2128,25 @@ public class Workspace extends SmoothPagedView
view.setVisibility(VISIBLE);
}
}
@Override
public void onAnimationCancel(Animator arg0) {
}
@Override
public void onAnimationEnd(Animator arg0) {
updateVisibility(view);
}
@Override
public void onAnimationRepeat(Animator arg0) {
}
@Override
public void onAnimationStart(Animator arg0) {
// We want the views to be visible for animation, so fade-in/out is visible
view.setVisibility(VISIBLE);
}
}
@Override