@Override public boolean canApplyTheme(Drawable drawable) { return drawable.canApplyTheme(); }
@Override public boolean canApplyTheme(Drawable drawable) { return drawable.canApplyTheme(); }
@Deprecated @Nullable public Drawable getDrawable(int id) throws NotFoundException { final Drawable d = getDrawable(id, null); if (d != null && d.canApplyTheme()) { Log.w(TAG, "Drawable " + getResourceName(id) + " has unresolved theme " + "attributes! Consider using Resources.getDrawable(int, Theme) or " + "Context.getDrawable(int).", new RuntimeException()); } return d; }
@RequiresApi(Build.VERSION_CODES.LOLLIPOP) @Override public boolean canApplyTheme() { final int count = mNumChildren; final Drawable[] drawables = mDrawables; for (int i = 0; i < count; i++) { final Drawable d = drawables[i]; if (d != null) { if (d.canApplyTheme()) { return true; } } else { final ConstantState future = mDrawableFutures.get(i); if (future != null && future.canApplyTheme()) { return true; } } } return false; }
@RequiresApi(Build.VERSION_CODES.LOLLIPOP) final void applyTheme(Theme theme) { if (theme != null) { createAllFutures(); final int count = mNumChildren; final Drawable[] drawables = mDrawables; for (int i = 0; i < count; i++) { if (drawables[i] != null && drawables[i].canApplyTheme()) { drawables[i].applyTheme(theme); // Update cached mask of child changing configurations. mChildrenChangingConfigurations |= drawables[i].getChangingConfigurations(); } } updateDensity(theme.getResources()); } }
/** */ @Override @SuppressLint("NewApi") public boolean canApplyTheme() { return UiConfig.MATERIALIZED && mDrawable.canApplyTheme(); }
@TargetApi(Build.VERSION_CODES.LOLLIPOP) @Override public boolean canApplyTheme() { return mDrawable.canApplyTheme(); }
/** */ @Override @SuppressLint("NewApi") public boolean canApplyTheme() { return UiConfig.MATERIALIZED && mDrawable.canApplyTheme(); }
/** */ @Override @SuppressLint("NewApi") public boolean canApplyTheme() { return UiConfig.MATERIALIZED && mDrawable.canApplyTheme(); }
data.put("CanApplyTheme", d.canApplyTheme()); data.put("ColorFilter", String.valueOf(d.getColorFilter())); data.put("DirtyBounds", d.getDirtyBounds().toShortString());