VectorDrawable

Class of android.graphics.drawable · VectorDrawable.java · Android's reference

public class VectorDrawable extends Drawable

VectorDrawable ← Drawable

A drawable of vector paths, from a <vector> resource: groups (each a transform of its children), paths filled and stroked with colors, color state lists or gradients, and clip paths, in a viewport scaled to the bounds. The tint colors the whole drawable, as Android's does with its tint mode (src_in by default).

Members

public VectorDrawable() source

Inflation

public void inflate(Resources r, XmlPullParser parser, AttributeSet attrs, Resources.Theme theme) throws XmlPullParserException, IOException source

State and tint

public void setTintList(ColorStateList tint) source
public void setTintMode(PorterDuff.Mode tintMode) source
public boolean isStateful() source
protected boolean onStateChange(int[] state) source

Drawing

public void draw(Canvas canvas) source
public void setAlpha(int alpha) source
public int getAlpha() source
public void setColorFilter(ColorFilter colorFilter) source
public ColorFilter getColorFilter() source
public int getOpacity() source
public int getIntrinsicWidth() source
public int getIntrinsicHeight() source
public boolean isAutoMirrored() source
public void setAutoMirrored(boolean mirrored) source
public Drawable mutate() source

Made from ScarletNX's Sail at 166ad3910f80. The framework is ScarletNX's (GPL-3.0-or-later); the parts that follow the Android Open Source Project's sources (Apache-2.0) say so in their files.