Fix crash when switching between Apps/Widgets tabs

Bug: 8138894
This commit is contained in:
Michael Jurka committed 2013-02-07 13:27:30 +01:00
1 parent b81e22ef4a
commit ee8e99fe3b
4 files changed
+20 -11

No files matched your search

@@ -264,15 +264,19 @@ public class AppsCustomizeTabHost extends TabHost implements LauncherTransitiona
// Animate the transition
ObjectAnimator outAnim = LauncherAnimUtils.ofFloat(mAnimationBuffer, "alpha", 0f);
outAnim.addListener(new AnimatorListenerAdapter() {
private void clearAnimationBuffer() {
mAnimationBuffer.setVisibility(View.GONE);
PagedViewWidget.setRecyclePreviewsWhenDetachedFromWindow(false);
mAnimationBuffer.removeAllViews();
PagedViewWidget.setRecyclePreviewsWhenDetachedFromWindow(true);
}
@Override
public void onAnimationEnd(Animator animation) {
mAnimationBuffer.setVisibility(View.GONE);
mAnimationBuffer.removeAllViews();
clearAnimationBuffer();
}
@Override
public void onAnimationCancel(Animator animation) {
mAnimationBuffer.setVisibility(View.GONE);
mAnimationBuffer.removeAllViews();
clearAnimationBuffer();
}
});
ObjectAnimator inAnim = LauncherAnimUtils.ofFloat(mAppsCustomizePane, "alpha", 1f);