List of usage examples for android.graphics.drawable Drawable createFromXmlInner
@NonNull public static Drawable createFromXmlInner(@NonNull Resources r, @NonNull XmlPullParser parser, @NonNull AttributeSet attrs) throws XmlPullParserException, IOException
From source file:android.content.res.VectorResources.java
private Drawable createDrawableFromXmlInner(XmlPullParser parser, AttributeSet attrs) throws XmlPullParserException, IOException { final Drawable drawable; final String name = parser.getName(); switch (name) { case "vector": VectorDrawable vectorDrawable = new VectorDrawable(); vectorDrawable.inflate(this, parser, attrs); drawable = vectorDrawable;/*from w ww . j a v a2s. co m*/ break; case "animated-vector": AnimatedVectorDrawable animatedVectorDrawable = new AnimatedVectorDrawable(); animatedVectorDrawable.inflate(mContext, parser, attrs); drawable = animatedVectorDrawable; break; default: drawable = Drawable.createFromXmlInner(this, parser, attrs); } return drawable; }