Loading core/java/android/view/View.java +23 −17 Original line number Diff line number Diff line Loading @@ -7597,6 +7597,7 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal */ public void setAlpha(float alpha) { ensureTransformationInfo(); if (mTransformationInfo.mAlpha != alpha) { mTransformationInfo.mAlpha = alpha; invalidateParentCaches(); if (onSetAlpha((int) (alpha * 255))) { Loading @@ -7608,6 +7609,7 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal invalidate(false); } } } /** * Faster version of setAlpha() which performs the same steps except there are Loading @@ -7616,18 +7618,22 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal * alpha (the return value for onSetAlpha()). * * @param alpha The new value for the alpha property * @return true if the View subclass handles alpha (the return value for onSetAlpha()) * @return true if the View subclass handles alpha (the return value for onSetAlpha()) and * the new value for the alpha property is different from the old value */ boolean setAlphaNoInvalidation(float alpha) { ensureTransformationInfo(); if (mTransformationInfo.mAlpha != alpha) { mTransformationInfo.mAlpha = alpha; boolean subclassHandlesAlpha = onSetAlpha((int) (alpha * 255)); if (subclassHandlesAlpha) { mPrivateFlags |= ALPHA_SET; return true; } else { mPrivateFlags &= ~ALPHA_SET; } return subclassHandlesAlpha; } return false; } /** Loading Loading
core/java/android/view/View.java +23 −17 Original line number Diff line number Diff line Loading @@ -7597,6 +7597,7 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal */ public void setAlpha(float alpha) { ensureTransformationInfo(); if (mTransformationInfo.mAlpha != alpha) { mTransformationInfo.mAlpha = alpha; invalidateParentCaches(); if (onSetAlpha((int) (alpha * 255))) { Loading @@ -7608,6 +7609,7 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal invalidate(false); } } } /** * Faster version of setAlpha() which performs the same steps except there are Loading @@ -7616,18 +7618,22 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal * alpha (the return value for onSetAlpha()). * * @param alpha The new value for the alpha property * @return true if the View subclass handles alpha (the return value for onSetAlpha()) * @return true if the View subclass handles alpha (the return value for onSetAlpha()) and * the new value for the alpha property is different from the old value */ boolean setAlphaNoInvalidation(float alpha) { ensureTransformationInfo(); if (mTransformationInfo.mAlpha != alpha) { mTransformationInfo.mAlpha = alpha; boolean subclassHandlesAlpha = onSetAlpha((int) (alpha * 255)); if (subclassHandlesAlpha) { mPrivateFlags |= ALPHA_SET; return true; } else { mPrivateFlags &= ~ALPHA_SET; } return subclassHandlesAlpha; } return false; } /** Loading