Fixed a vector drawable bug on API 21+
This commit is contained in:
parent
9ec6956c70
commit
3b2dd8402d
1 changed files with 3 additions and 0 deletions
|
|
@ -99,6 +99,9 @@ public class Util {
|
|||
}
|
||||
|
||||
public static Drawable getVectorDrawable(@NonNull Resources res, @DrawableRes int resId, @Nullable Resources.Theme theme) {
|
||||
if (Build.VERSION.SDK_INT >= 21) {
|
||||
return res.getDrawable(resId, theme);
|
||||
}
|
||||
return VectorDrawableCompat.create(res, resId, theme);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue