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:
@@ -128,6 +128,26 @@ public class ScaleDrawable extends Drawable implements Drawable.Callback {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void applyTheme(Theme t) {
|
||||
super.applyTheme(t);
|
||||
|
||||
final ScaleState state = mScaleState;
|
||||
if (state == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (state.mDrawable != null) {
|
||||
state.mDrawable.applyTheme(t);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canApplyTheme() {
|
||||
final ScaleState state = mScaleState;
|
||||
return state != null && state.mDrawable != null && state.mDrawable.canApplyTheme();
|
||||
}
|
||||
|
||||
// overrides from Drawable.Callback
|
||||
|
||||
public void invalidateDrawable(Drawable who) {
|
||||
|
||||
Reference in New Issue
Block a user