Update preload list, clean up drawable theming
Removes all implementations of three-arg ConstantState constructor, since we handle mutation and applyTheme() in Resources now. Moves progress bar tinting to android:tint attribute. Correctly implements applyTheme() and canApplyTheme() in all drawable wrapper and container classes. Change-Id: Ic9cb43d0d6228aa4914f3124bed234b837beaa41
This commit is contained in:
@@ -313,6 +313,26 @@ public class AnimatedRotateDrawable extends Drawable implements Drawable.Callbac
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void applyTheme(Theme t) {
|
||||
super.applyTheme(t);
|
||||
|
||||
final AnimatedRotateState state = mState;
|
||||
if (state == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (state.mDrawable != null) {
|
||||
state.mDrawable.applyTheme(t);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canApplyTheme() {
|
||||
final AnimatedRotateState state = mState;
|
||||
return state != null && state.mDrawable != null && state.mDrawable.canApplyTheme();
|
||||
}
|
||||
|
||||
public void setFramesCount(int framesCount) {
|
||||
mState.mFramesCount = framesCount;
|
||||
mIncrement = 360.0f / mState.mFramesCount;
|
||||
|
||||
Reference in New Issue
Block a user