Fixed a vector drawable bug on API 21+

This commit is contained in:
Karim Abou Zeid 2016-04-09 15:27:01 +02:00
commit 3b2dd8402d

View file

@ -99,6 +99,9 @@ public class Util {
} }
public static Drawable getVectorDrawable(@NonNull Resources res, @DrawableRes int resId, @Nullable Resources.Theme theme) { 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); return VectorDrawableCompat.create(res, resId, theme);
} }