Merge "Fix invisible views issue in Launcher."

This commit is contained in:
Romain Guy
2010-10-12 11:55:50 -07:00
committed by Android (Google) Code Review
2 changed files with 5 additions and 1 deletions

View File

@ -5468,9 +5468,11 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility
public void setAlpha(float alpha) {
mAlpha = alpha;
if (onSetAlpha((int) (alpha * 255))) {
mPrivateFlags |= ALPHA_SET;
// subclass is handling alpha - don't optimize rendering cache invalidation
invalidate();
} else {
mPrivateFlags &= ~ALPHA_SET;
invalidate(false);
}
}

View File

@ -2188,7 +2188,9 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
float alpha = child.getAlpha();
// Bail out early if the view does not need to be drawn
if (alpha <= ViewConfiguration.ALPHA_THRESHOLD) return more;
if (alpha <= ViewConfiguration.ALPHA_THRESHOLD && (child.mPrivateFlags & ALPHA_SET) == 0) {
return more;
}
child.computeScroll();