Deprecation of IconsCacheMethods.
This commit is contained in:
parent
47b71145da
commit
a0f78e64a8
1 changed files with 12 additions and 1 deletions
|
@ -34,10 +34,12 @@ public class IconsCache {
|
|||
return new BitmapDrawable(app.getResources(), bitmapResized);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
private Drawable getDrawable(@DrawableRes int resId, @ColorRes int clrId) {
|
||||
return getDrawable(resId, clrId, 0);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
private Drawable getDrawable(@DrawableRes int resId, @ColorRes int clrId, float scale) {
|
||||
long hash = ((long)resId << 31l) + clrId + (int)(scale * 10000f);
|
||||
Drawable d = drawable.get(hash);
|
||||
|
@ -56,6 +58,7 @@ public class IconsCache {
|
|||
return d;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
private Drawable getPaintedDrawable(@DrawableRes int resId, @ColorInt int color){
|
||||
long hash = ((long)resId << 31l) + color;
|
||||
Drawable d = drawable.get(hash);
|
||||
|
@ -68,18 +71,22 @@ public class IconsCache {
|
|||
return d;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public Drawable getPaintedContentIcon(@DrawableRes int id, @ColorInt int color){
|
||||
return getPaintedDrawable(id, color);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public Drawable getIcon(@DrawableRes int id, @ColorRes int colorId) {
|
||||
return getDrawable(id, colorId);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public Drawable getIcon(@DrawableRes int id, @ColorRes int colorId, float scale) {
|
||||
return getDrawable(id, colorId, scale);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public Drawable getIcon(@DrawableRes int backgroundId, @DrawableRes int id, @ColorRes int colorId) {
|
||||
Drawable b = getDrawable(backgroundId, 0);
|
||||
Drawable f = getDrawable(id, colorId);
|
||||
|
@ -89,18 +96,22 @@ public class IconsCache {
|
|||
return new LayerDrawable(layers);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public Drawable getContentIcon(@DrawableRes int id) {
|
||||
return getDrawable(id, app.getSettings().isLightContent() ? R.color.icon_color : 0);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public Drawable getContentIcon(@DrawableRes int id, boolean isLightContent) {
|
||||
return getDrawable(id, isLightContent ? R.color.icon_color : 0);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public Drawable getIcon(@DrawableRes int id) {
|
||||
return getDrawable(id, 0);
|
||||
}
|
||||
|
||||
|
||||
@Deprecated
|
||||
public Drawable getIcon(@DrawableRes int id, boolean light) {
|
||||
return getDrawable(id, light ? R.color.icon_color : 0);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue