}
@Override
- public
- @Config
- int getChangingConfigurations() {
+ public @Config int getChangingConfigurations() {
return super.getChangingConfigurations()
| mDrawableContainerState.getChangingConfigurations();
}
/**
* Change the global fade duration when a new drawable is entering
* the scene.
- *
* @param ms The amount of time to fade in milliseconds.
*/
public void setEnterFadeDuration(int ms) {
/**
* Change the global fade duration when a new drawable is leaving
* the scene.
- *
* @param ms The amount of time to fade in milliseconds.
*/
public void setExitFadeDuration(int ms) {
@Override
public void invalidateDrawable(@NonNull Drawable who) {
- // This may have been called as the result of a tint changing, in
- // which case we may need to refresh the cached statefulness or
- // opacity.
- if (mDrawableContainerState != null) {
- mDrawableContainerState.invalidateCache();
- }
-
if (who == mCurrDrawable && getCallback() != null) {
getCallback().invalidateDrawable(this);
}
mDrawables[pos] = dr;
mNumChildren++;
mChildrenChangingConfigurations |= dr.getChangingConfigurations();
-
- invalidateCache();
+ mCheckedStateful = false;
+ mCheckedOpacity = false;
mConstantPadding = null;
mCheckedPadding = false;
return pos;
}
- /**
- * Invalidates the cached opacity and statefulness.
- */
- void invalidateCache() {
- mCheckedOpacity = false;
- mCheckedStateful = false;
- }
-
final int getCapacity() {
return mDrawables.length;
}
if (mSuspendChildInvalidation) {
mChildRequestedInvalidation = true;
} else {
- // This may have been called as the result of a tint changing, in
- // which case we may need to refresh the cached statefulness or
- // opacity.
- mLayerState.invalidateCache();
-
invalidateSelf();
}
}
return true;
}
- /**
- * Invalidates the cached opacity and statefulness.
- */
- void invalidateCache() {
+ public void invalidateCache() {
mCheckedOpacity = false;
mCheckedStateful = false;
}