What is the difference in these functions relative to support vectors?
AppCompatDrawable.getDrawable(...) will inflate all kinds of drawings, including
- API 21 ( build script; )
- AppCompat
- ,
ContextCompat.getDrawable(Context, int)
AppCompatDrawableManager.get().getDrawable(Context, int), API. .
VectorDrawableCompat.create(...) ( build script, ).
(Android 4.3)
VectorDrawableCompat.create(...) null . , drawable , , , , , PNG API 21.
API 21, build.gradle:
android {
defaultConfig {
vectorDrawables.useSupportLibrary = true
}
}
. Android Support Library 23.2 .
24.2.1 AppCompatDelegate.setCompatVectorFromResourcesEnabled(true)
. build.gradle, .
, LayerDrawable StateListDrawable.
AppCompat - , , .