Minor fixes to Launcher
- Adding checks to prevent multiple onSetAlpha's to be called (especially now that we are using display lists)
- Removing an old change to keep artificially make the last page wider
- Fixing issue where you could click on an item in the paged view while the page it was on is being faded out
Change-Id: I9b194565602b5200c0688da2caec9c3c829b3bb0
diff --git a/src/com/android/launcher2/BubbleTextView.java b/src/com/android/launcher2/BubbleTextView.java
index 076f574..f4a3d44 100644
--- a/src/com/android/launcher2/BubbleTextView.java
+++ b/src/com/android/launcher2/BubbleTextView.java
@@ -39,6 +39,7 @@
private final RectF mRect = new RectF();
private Paint mPaint;
+ private int mPrevAlpha = -1;
private boolean mBackgroundSizeChanged;
private Drawable mBackground;
@@ -147,7 +148,11 @@
@Override
protected boolean onSetAlpha(int alpha) {
- mPaint.setAlpha(alpha);
- return super.onSetAlpha(alpha);
+ if (mPrevAlpha != alpha) {
+ mPrevAlpha = alpha;
+ mPaint.setAlpha(alpha);
+ super.onSetAlpha(alpha);
+ }
+ return true;
}
}