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
This commit is contained in:
Winson Chung
2010-11-12 13:40:58 -08:00
parent cbbaf9862a
commit e22a8e9d3e
5 changed files with 37 additions and 38 deletions

View File

@@ -39,6 +39,7 @@ public class BubbleTextView extends TextView {
private final RectF mRect = new RectF();
private Paint mPaint;
private int mPrevAlpha = -1;
private boolean mBackgroundSizeChanged;
private Drawable mBackground;
@@ -147,7 +148,11 @@ public class BubbleTextView extends TextView {
@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;
}
}