# VectorDrawableCompat

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  
belongs to Maven artifact com.android.support:support-vector-drawable:28.0.0-alpha1  
Summary:[Methods](https://developer.android.com/reference/android/support/graphics/drawable/VectorDrawableCompat#pubmethods)\|[Protected Methods](https://developer.android.com/reference/android/support/graphics/drawable/VectorDrawableCompat#promethods)\|[Inherited Methods](https://developer.android.com/reference/android/support/graphics/drawable/VectorDrawableCompat#inhmethods)\|[\[Expand All\]](https://developer.android.com/reference/android/support/graphics/drawable/VectorDrawableCompat#)  

# VectorDrawableCompat

| This package is part of the Android[support library](https://developer.android.com/topic/libraries/support-library)which is no longer maintained. The support library has been superseded by[AndroidX](https://developer.android.com/jetpack/androidx)which is part of[Jetpack](https://developer.android.com/jetpack). We recommend using the AndroidX libraries in all new projects. You should also consider[migrating](https://developer.android.com/jetpack/androidx/migrate)existing projects to AndroidX. To find the AndroidX class that maps to this deprecated class, see the AndroidX support library[class mappings](https://developer.android.com/jetpack/androidx/migrate/class-mappings).

`
public


class
VectorDrawableCompat
`  
`


``

extends `[Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html)`


``


`

|---|---|--------------------------------------------------------|
| java.lang.Object                                             |||
| ↳ | [android.graphics.drawable.Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html) ||
|   | ↳ | android.support.graphics.drawable.VectorDrawableCompat |

<br />

*** ** * ** ***

For API 24 and above, this class is delegating to the framework's[VectorDrawable](https://developer.android.com/reference/android/graphics/drawable/VectorDrawable.html). For older API version, this class lets you create a drawable based on an XML vector graphic.

<br />

You can always create a VectorDrawableCompat object and use it as a Drawable by the Java API. In order to refer to VectorDrawableCompat inside a XML file, you can use app:srcCompat attribute in AppCompat library's ImageButton or ImageView.

<br />

**Note:** To optimize for the re-drawing performance, one bitmap cache is created for each VectorDrawableCompat. Therefore, referring to the same VectorDrawableCompat means sharing the same bitmap cache. If these references don't agree upon on the same size, the bitmap will be recreated and redrawn every time size is changed. In other words, if a VectorDrawable is used for different sizes, it is more efficient to create multiple VectorDrawables, one for each size.

<br />

VectorDrawableCompat can be defined in an XML file with the`<vector>`element.

<br />

The VectorDrawableCompat has the following elements:

<br />

`<vector>`
:   Used to define a vector drawable

    `android:name`
    :   Defines the name of this vector drawable.

    `android:width`
    :   Used to define the intrinsic width of the drawable. This support all the dimension units, normally specified with dp.

    `android:height`
    :   Used to define the intrinsic height the drawable. This support all the dimension units, normally specified with dp.

    `android:viewportWidth`
    :   Used to define the width of the viewport space. Viewport is basically the virtual canvas where the paths are drawn on.

    `android:viewportHeight`
    :   Used to define the height of the viewport space. Viewport is basically the virtual canvas where the paths are drawn on.

    `android:tint`
    :   The color to apply to the drawable as a tint. By default, no tint is applied.

    `android:tintMode`
    :   The Porter-Duff blending mode for the tint color. Default is src_in.

    `android:autoMirrored`
    :   Indicates if the drawable needs to be mirrored when its layout direction is RTL (right-to-left). Default is false.

    `android:alpha`
    :   The opacity of this drawable. Default is 1.

`<group>`
:   Defines a group of paths or subgroups, plus transformation information. The transformations are defined in the same coordinates as the viewport. And the transformations are applied in the order of scale, rotate then translate.

    `android:name`
    :   Defines the name of the group.

    `android:rotation`
    :   The degrees of rotation of the group. Default is 0.

    `android:pivotX`
    :   The X coordinate of the pivot for the scale and rotation of the group. This is defined in the viewport space. Default is 0.

    `android:pivotY`
    :   The Y coordinate of the pivot for the scale and rotation of the group. This is defined in the viewport space. Default is 0.

    `android:scaleX`
    :   The amount of scale on the X Coordinate. Default is 1.

    `android:scaleY`
    :   The amount of scale on the Y coordinate. Default is 1.

    `android:translateX`
    :   The amount of translation on the X coordinate. This is defined in the viewport space. Default is 0.

    `android:translateY`
    :   The amount of translation on the Y coordinate. This is defined in the viewport space. Default is 0.

`<path>`
:   Defines paths to be drawn.

    `android:name`
    :   Defines the name of the path.

    `android:pathData`
    :   Defines path data using exactly same format as "d" attribute in the SVG's path data. This is defined in the viewport space.

    `android:fillColor`
    :   Specifies the color used to fill the path. If this property is animated, any value set by the animation will override the original value. No path fill is drawn if this property is not specified.

    `android:strokeColor`
    :   Specifies the color used to draw the path outline. If this property is animated, any value set by the animation will override the original value. No path outline is drawn if this property is not specified.

    `android:strokeWidth`
    :   The width a path stroke. Default is 0.

    `android:strokeAlpha`
    :   The opacity of a path stroke. Default is 1.

    `android:fillAlpha`
    :   The opacity to fill the path with. Default is 1.

    `android:trimPathStart`
    :   The fraction of the path to trim from the start, in the range from 0 to 1. Default is 0.

    `android:trimPathEnd`
    :   The fraction of the path to trim from the end, in the range from 0 to 1. Default is 1.

    `android:trimPathOffset`
    :   Shift trim region (allows showed region to include the start and end), in the range from 0 to 1. Default is 0.

    `android:strokeLineCap`
    :   Sets the linecap for a stroked path: butt, round, square. Default is butt.

    `android:strokeLineJoin`
    :   Sets the lineJoin for a stroked path: miter,round,bevel. Default is miter.

    `android:strokeMiterLimit`
    :   Sets the Miter limit for a stroked path. Default is 4.

    `android:fillType`
    :   Sets the fillType for a path. The types can be either "evenOdd" or "nonZero". They behave the same as SVG's "fill-rule" properties. Default is nonZero. For more details, see[FillRuleProperty](https://www.w3.org/TR/SVG/painting.html#FillRuleProperty)

`<clip-path>`
:   Defines path to be the current clip. Note that the clip path only apply to the current group and its children.

    `android:name`
    :   Defines the name of the clip path.

    `android:pathData`
    :   Defines clip path using the same format as "d" attribute in the SVG's path data.

<br />

Note that theme attributes in XML file are supported through[inflate(Resources, XmlPullParser, AttributeSet, Theme)](https://developer.android.com/reference/android/support/graphics/drawable/VectorDrawableCompat#inflate(android.content.res.Resources, org.xmlpull.v1.XmlPullParser, android.util.AttributeSet, android.content.res.Resources.Theme)).

<br />

## Summary

|                                                                                                                                                                                                                                                                                                                                                                                                                                                      ### Public methods                                                                                                                                                                                                                                                                                                                                                                                                                                                      ||
|----------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` void`                                                                                                                          | ` `[applyTheme](https://developer.android.com/reference/android/support/graphics/drawable/VectorDrawableCompat#applyTheme(android.content.res.Resources.Theme))`(`[Resources.Theme](https://developer.android.com/reference/android/content/res/Resources.Theme.html)` t) `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| ` boolean`                                                                                                                       | ` `[canApplyTheme](https://developer.android.com/reference/android/support/graphics/drawable/VectorDrawableCompat#canApplyTheme())`() `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| ` void`                                                                                                                          | ` `[clearColorFilter](https://developer.android.com/reference/android/support/graphics/drawable/VectorDrawableCompat#clearColorFilter())`() `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| ` static `[VectorDrawableCompat](https://developer.android.com/reference/android/support/graphics/drawable/VectorDrawableCompat) | ` `[create](https://developer.android.com/reference/android/support/graphics/drawable/VectorDrawableCompat#create(android.content.res.Resources, int, android.content.res.Resources.Theme))`(`[Resources](https://developer.android.com/reference/android/content/res/Resources.html)` res, int resId, `[Resources.Theme](https://developer.android.com/reference/android/content/res/Resources.Theme.html)` theme) ` Create a VectorDrawableCompat object.                                                                                                                                                                                                                                                                                                                                |
| ` static `[VectorDrawableCompat](https://developer.android.com/reference/android/support/graphics/drawable/VectorDrawableCompat) | ` `[createFromXmlInner](https://developer.android.com/reference/android/support/graphics/drawable/VectorDrawableCompat#createFromXmlInner(android.content.res.Resources, org.xmlpull.v1.XmlPullParser, android.util.AttributeSet, android.content.res.Resources.Theme))`(`[Resources](https://developer.android.com/reference/android/content/res/Resources.html)` r, XmlPullParser parser, `[AttributeSet](https://developer.android.com/reference/android/util/AttributeSet.html)` attrs, `[Resources.Theme](https://developer.android.com/reference/android/content/res/Resources.Theme.html)` theme) ` Create a VectorDrawableCompat from inside an XML document using an optional[Resources.Theme](https://developer.android.com/reference/android/content/res/Resources.Theme.html). |
| ` void`                                                                                                                          | ` `[draw](https://developer.android.com/reference/android/support/graphics/drawable/VectorDrawableCompat#draw(android.graphics.Canvas))`(`[Canvas](https://developer.android.com/reference/android/graphics/Canvas.html)` canvas) `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| ` int`                                                                                                                           | ` `[getAlpha](https://developer.android.com/reference/android/support/graphics/drawable/VectorDrawableCompat#getAlpha())`() `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| ` int`                                                                                                                           | ` `[getChangingConfigurations](https://developer.android.com/reference/android/support/graphics/drawable/VectorDrawableCompat#getChangingConfigurations())`() `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| ` `[ColorFilter](https://developer.android.com/reference/android/graphics/ColorFilter.html)                                      | ` `[getColorFilter](https://developer.android.com/reference/android/support/graphics/drawable/VectorDrawableCompat#getColorFilter())`() `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| ` `[Drawable.ConstantState](https://developer.android.com/reference/android/graphics/drawable/Drawable.ConstantState.html)       | ` `[getConstantState](https://developer.android.com/reference/android/support/graphics/drawable/VectorDrawableCompat#getConstantState())`() `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| ` `[Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html)                                   | ` `[getCurrent](https://developer.android.com/reference/android/support/graphics/drawable/VectorDrawableCompat#getCurrent())`() `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| ` int`                                                                                                                           | ` `[getIntrinsicHeight](https://developer.android.com/reference/android/support/graphics/drawable/VectorDrawableCompat#getIntrinsicHeight())`() `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| ` int`                                                                                                                           | ` `[getIntrinsicWidth](https://developer.android.com/reference/android/support/graphics/drawable/VectorDrawableCompat#getIntrinsicWidth())`() `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| ` int`                                                                                                                           | ` `[getMinimumHeight](https://developer.android.com/reference/android/support/graphics/drawable/VectorDrawableCompat#getMinimumHeight())`() `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| ` int`                                                                                                                           | ` `[getMinimumWidth](https://developer.android.com/reference/android/support/graphics/drawable/VectorDrawableCompat#getMinimumWidth())`() `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| ` int`                                                                                                                           | ` `[getOpacity](https://developer.android.com/reference/android/support/graphics/drawable/VectorDrawableCompat#getOpacity())`() `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| ` boolean`                                                                                                                       | ` `[getPadding](https://developer.android.com/reference/android/support/graphics/drawable/VectorDrawableCompat#getPadding(android.graphics.Rect))`(`[Rect](https://developer.android.com/reference/android/graphics/Rect.html)` padding) `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| ` int[]`                                                                                                                         | ` `[getState](https://developer.android.com/reference/android/support/graphics/drawable/VectorDrawableCompat#getState())`() `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| ` `[Region](https://developer.android.com/reference/android/graphics/Region.html)                                                | ` `[getTransparentRegion](https://developer.android.com/reference/android/support/graphics/drawable/VectorDrawableCompat#getTransparentRegion())`() `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| ` void`                                                                                                                          | ` `[inflate](https://developer.android.com/reference/android/support/graphics/drawable/VectorDrawableCompat#inflate(android.content.res.Resources, org.xmlpull.v1.XmlPullParser, android.util.AttributeSet, android.content.res.Resources.Theme))`(`[Resources](https://developer.android.com/reference/android/content/res/Resources.html)` res, XmlPullParser parser, `[AttributeSet](https://developer.android.com/reference/android/util/AttributeSet.html)` attrs, `[Resources.Theme](https://developer.android.com/reference/android/content/res/Resources.Theme.html)` theme) `                                                                                                                                                                                                     |
| ` void`                                                                                                                          | ` `[inflate](https://developer.android.com/reference/android/support/graphics/drawable/VectorDrawableCompat#inflate(android.content.res.Resources, org.xmlpull.v1.XmlPullParser, android.util.AttributeSet))`(`[Resources](https://developer.android.com/reference/android/content/res/Resources.html)` res, XmlPullParser parser, `[AttributeSet](https://developer.android.com/reference/android/util/AttributeSet.html)` attrs) `                                                                                                                                                                                                                                                                                                                                                       |
| ` void`                                                                                                                          | ` `[invalidateSelf](https://developer.android.com/reference/android/support/graphics/drawable/VectorDrawableCompat#invalidateSelf())`() `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| ` boolean`                                                                                                                       | ` `[isAutoMirrored](https://developer.android.com/reference/android/support/graphics/drawable/VectorDrawableCompat#isAutoMirrored())`() `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| ` boolean`                                                                                                                       | ` `[isStateful](https://developer.android.com/reference/android/support/graphics/drawable/VectorDrawableCompat#isStateful())`() `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| ` void`                                                                                                                          | ` `[jumpToCurrentState](https://developer.android.com/reference/android/support/graphics/drawable/VectorDrawableCompat#jumpToCurrentState())`() `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| ` `[Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html)                                   | ` `[mutate](https://developer.android.com/reference/android/support/graphics/drawable/VectorDrawableCompat#mutate())`() `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| ` void`                                                                                                                          | ` `[scheduleSelf](https://developer.android.com/reference/android/support/graphics/drawable/VectorDrawableCompat#scheduleSelf(java.lang.Runnable, long))`(Runnable what, long when) `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| ` void`                                                                                                                          | ` `[setAlpha](https://developer.android.com/reference/android/support/graphics/drawable/VectorDrawableCompat#setAlpha(int))`(int alpha) `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| ` void`                                                                                                                          | ` `[setAutoMirrored](https://developer.android.com/reference/android/support/graphics/drawable/VectorDrawableCompat#setAutoMirrored(boolean))`(boolean mirrored) `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| ` void`                                                                                                                          | ` `[setChangingConfigurations](https://developer.android.com/reference/android/support/graphics/drawable/VectorDrawableCompat#setChangingConfigurations(int))`(int configs) `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| ` void`                                                                                                                          | ` `[setColorFilter](https://developer.android.com/reference/android/support/graphics/drawable/VectorDrawableCompat#setColorFilter(android.graphics.ColorFilter))`(`[ColorFilter](https://developer.android.com/reference/android/graphics/ColorFilter.html)` colorFilter) `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| ` void`                                                                                                                          | ` `[setColorFilter](https://developer.android.com/reference/android/support/graphics/drawable/VectorDrawableCompat#setColorFilter(int, android.graphics.PorterDuff.Mode))`(int color, `[PorterDuff.Mode](https://developer.android.com/reference/android/graphics/PorterDuff.Mode.html)` mode) `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| ` void`                                                                                                                          | ` `[setFilterBitmap](https://developer.android.com/reference/android/support/graphics/drawable/VectorDrawableCompat#setFilterBitmap(boolean))`(boolean filter) `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| ` void`                                                                                                                          | ` `[setHotspot](https://developer.android.com/reference/android/support/graphics/drawable/VectorDrawableCompat#setHotspot(float, float))`(float x, float y) `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| ` void`                                                                                                                          | ` `[setHotspotBounds](https://developer.android.com/reference/android/support/graphics/drawable/VectorDrawableCompat#setHotspotBounds(int, int, int, int))`(int left, int top, int right, int bottom) `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| ` boolean`                                                                                                                       | ` `[setState](https://developer.android.com/reference/android/support/graphics/drawable/VectorDrawableCompat#setState(int[]))`(int[] stateSet) `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| ` void`                                                                                                                          | ` `[setTint](https://developer.android.com/reference/android/support/graphics/drawable/VectorDrawableCompat#setTint(int))`(int tint) `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| ` void`                                                                                                                          | ` `[setTintList](https://developer.android.com/reference/android/support/graphics/drawable/VectorDrawableCompat#setTintList(android.content.res.ColorStateList))`(`[ColorStateList](https://developer.android.com/reference/android/content/res/ColorStateList.html)` tint) `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| ` void`                                                                                                                          | ` `[setTintMode](https://developer.android.com/reference/android/support/graphics/drawable/VectorDrawableCompat#setTintMode(android.graphics.PorterDuff.Mode))`(`[PorterDuff.Mode](https://developer.android.com/reference/android/graphics/PorterDuff.Mode.html)` tintMode) `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| ` boolean`                                                                                                                       | ` `[setVisible](https://developer.android.com/reference/android/support/graphics/drawable/VectorDrawableCompat#setVisible(boolean, boolean))`(boolean visible, boolean restart) `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| ` void`                                                                                                                          | ` `[unscheduleSelf](https://developer.android.com/reference/android/support/graphics/drawable/VectorDrawableCompat#unscheduleSelf(java.lang.Runnable))`(Runnable what) `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |

|                                                                                                                     ### Protected methods                                                                                                                     ||
|------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` void`    | ` `[onBoundsChange](https://developer.android.com/reference/android/support/graphics/drawable/VectorDrawableCompat#onBoundsChange(android.graphics.Rect))`(`[Rect](https://developer.android.com/reference/android/graphics/Rect.html)` bounds) ` |
| ` boolean` | ` `[onLevelChange](https://developer.android.com/reference/android/support/graphics/drawable/VectorDrawableCompat#onLevelChange(int))`(int level) `                                                                                               |
| ` boolean` | ` `[onStateChange](https://developer.android.com/reference/android/support/graphics/drawable/VectorDrawableCompat#onStateChange(int[]))`(int[] stateSet) `                                                                                        |

| ### Inherited methods |
|-----------------------|---|
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/graphics/drawable/VectorDrawableCompat#)From class` `[android.graphics.drawable.Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html)` ` |----------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` void`                                                                                                                    | ` applyTheme(`[Resources.Theme](https://developer.android.com/reference/android/content/res/Resources.Theme.html)` arg0) `                                                                                                                                                                                                                                                  | | ` boolean`                                                                                                                 | ` canApplyTheme() `                                                                                                                                                                                                                                                                                                                                                         | | ` void`                                                                                                                    | ` clearColorFilter() `                                                                                                                                                                                                                                                                                                                                                      | | ` final `[Rect](https://developer.android.com/reference/android/graphics/Rect.html)                                        | ` copyBounds() `                                                                                                                                                                                                                                                                                                                                                            | | ` final void`                                                                                                              | ` copyBounds(`[Rect](https://developer.android.com/reference/android/graphics/Rect.html)` arg0) `                                                                                                                                                                                                                                                                           | | ` static `[Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html)                      | ` createFromPath(String arg0) `                                                                                                                                                                                                                                                                                                                                             | | ` static `[Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html)                      | ` createFromResourceStream(`[Resources](https://developer.android.com/reference/android/content/res/Resources.html)` arg0, `[TypedValue](https://developer.android.com/reference/android/util/TypedValue.html)` arg1, InputStream arg2, String arg3, `[BitmapFactory.Options](https://developer.android.com/reference/android/graphics/BitmapFactory.Options.html)` arg4) ` | | ` static `[Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html)                      | ` createFromResourceStream(`[Resources](https://developer.android.com/reference/android/content/res/Resources.html)` arg0, `[TypedValue](https://developer.android.com/reference/android/util/TypedValue.html)` arg1, InputStream arg2, String arg3) `                                                                                                                      | | ` static `[Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html)                      | ` createFromStream(InputStream arg0, String arg1) `                                                                                                                                                                                                                                                                                                                         | | ` static `[Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html)                      | ` createFromXml(`[Resources](https://developer.android.com/reference/android/content/res/Resources.html)` arg0, XmlPullParser arg1) `                                                                                                                                                                                                                                       | | ` static `[Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html)                      | ` createFromXml(`[Resources](https://developer.android.com/reference/android/content/res/Resources.html)` arg0, XmlPullParser arg1, `[Resources.Theme](https://developer.android.com/reference/android/content/res/Resources.Theme.html)` arg2) `                                                                                                                           | | ` static `[Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html)                      | ` createFromXmlInner(`[Resources](https://developer.android.com/reference/android/content/res/Resources.html)` arg0, XmlPullParser arg1, `[AttributeSet](https://developer.android.com/reference/android/util/AttributeSet.html)` arg2, `[Resources.Theme](https://developer.android.com/reference/android/content/res/Resources.Theme.html)` arg3) `                       | | ` static `[Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html)                      | ` createFromXmlInner(`[Resources](https://developer.android.com/reference/android/content/res/Resources.html)` arg0, XmlPullParser arg1, `[AttributeSet](https://developer.android.com/reference/android/util/AttributeSet.html)` arg2) `                                                                                                                                   | | ` abstract void`                                                                                                           | ` draw(`[Canvas](https://developer.android.com/reference/android/graphics/Canvas.html)` arg0) `                                                                                                                                                                                                                                                                             | | ` int`                                                                                                                     | ` getAlpha() `                                                                                                                                                                                                                                                                                                                                                              | | ` final `[Rect](https://developer.android.com/reference/android/graphics/Rect.html)                                        | ` getBounds() `                                                                                                                                                                                                                                                                                                                                                             | | ` `[Drawable.Callback](https://developer.android.com/reference/android/graphics/drawable/Drawable.Callback.html)           | ` getCallback() `                                                                                                                                                                                                                                                                                                                                                           | | ` int`                                                                                                                     | ` getChangingConfigurations() `                                                                                                                                                                                                                                                                                                                                             | | ` `[ColorFilter](https://developer.android.com/reference/android/graphics/ColorFilter.html)                                | ` getColorFilter() `                                                                                                                                                                                                                                                                                                                                                        | | ` `[Drawable.ConstantState](https://developer.android.com/reference/android/graphics/drawable/Drawable.ConstantState.html) | ` getConstantState() `                                                                                                                                                                                                                                                                                                                                                      | | ` `[Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html)                             | ` getCurrent() `                                                                                                                                                                                                                                                                                                                                                            | | ` `[Rect](https://developer.android.com/reference/android/graphics/Rect.html)                                              | ` getDirtyBounds() `                                                                                                                                                                                                                                                                                                                                                        | | ` void`                                                                                                                    | ` getHotspotBounds(`[Rect](https://developer.android.com/reference/android/graphics/Rect.html)` arg0) `                                                                                                                                                                                                                                                                     | | ` int`                                                                                                                     | ` getIntrinsicHeight() `                                                                                                                                                                                                                                                                                                                                                    | | ` int`                                                                                                                     | ` getIntrinsicWidth() `                                                                                                                                                                                                                                                                                                                                                     | | ` int`                                                                                                                     | ` getLayoutDirection() `                                                                                                                                                                                                                                                                                                                                                    | | ` final int`                                                                                                               | ` getLevel() `                                                                                                                                                                                                                                                                                                                                                              | | ` int`                                                                                                                     | ` getMinimumHeight() `                                                                                                                                                                                                                                                                                                                                                      | | ` int`                                                                                                                     | ` getMinimumWidth() `                                                                                                                                                                                                                                                                                                                                                       | | ` abstract int`                                                                                                            | ` getOpacity() `                                                                                                                                                                                                                                                                                                                                                            | | ` void`                                                                                                                    | ` getOutline(`[Outline](https://developer.android.com/reference/android/graphics/Outline.html)` arg0) `                                                                                                                                                                                                                                                                     | | ` boolean`                                                                                                                 | ` getPadding(`[Rect](https://developer.android.com/reference/android/graphics/Rect.html)` arg0) `                                                                                                                                                                                                                                                                           | | ` int[]`                                                                                                                   | ` getState() `                                                                                                                                                                                                                                                                                                                                                              | | ` `[Region](https://developer.android.com/reference/android/graphics/Region.html)                                          | ` getTransparentRegion() `                                                                                                                                                                                                                                                                                                                                                  | | ` void`                                                                                                                    | ` inflate(`[Resources](https://developer.android.com/reference/android/content/res/Resources.html)` arg0, XmlPullParser arg1, `[AttributeSet](https://developer.android.com/reference/android/util/AttributeSet.html)` arg2, `[Resources.Theme](https://developer.android.com/reference/android/content/res/Resources.Theme.html)` arg3) `                                  | | ` void`                                                                                                                    | ` inflate(`[Resources](https://developer.android.com/reference/android/content/res/Resources.html)` arg0, XmlPullParser arg1, `[AttributeSet](https://developer.android.com/reference/android/util/AttributeSet.html)` arg2) `                                                                                                                                              | | ` void`                                                                                                                    | ` invalidateSelf() `                                                                                                                                                                                                                                                                                                                                                        | | ` boolean`                                                                                                                 | ` isAutoMirrored() `                                                                                                                                                                                                                                                                                                                                                        | | ` boolean`                                                                                                                 | ` isFilterBitmap() `                                                                                                                                                                                                                                                                                                                                                        | | ` boolean`                                                                                                                 | ` isStateful() `                                                                                                                                                                                                                                                                                                                                                            | | ` final boolean`                                                                                                           | ` isVisible() `                                                                                                                                                                                                                                                                                                                                                             | | ` void`                                                                                                                    | ` jumpToCurrentState() `                                                                                                                                                                                                                                                                                                                                                    | | ` `[Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html)                             | ` mutate() `                                                                                                                                                                                                                                                                                                                                                                | | ` void`                                                                                                                    | ` onBoundsChange(`[Rect](https://developer.android.com/reference/android/graphics/Rect.html)` arg0) `                                                                                                                                                                                                                                                                       | | ` boolean`                                                                                                                 | ` onLayoutDirectionChanged(int arg0) `                                                                                                                                                                                                                                                                                                                                      | | ` boolean`                                                                                                                 | ` onLevelChange(int arg0) `                                                                                                                                                                                                                                                                                                                                                 | | ` boolean`                                                                                                                 | ` onStateChange(int[] arg0) `                                                                                                                                                                                                                                                                                                                                               | | ` static int`                                                                                                              | ` resolveOpacity(int arg0, int arg1) `                                                                                                                                                                                                                                                                                                                                      | | ` void`                                                                                                                    | ` scheduleSelf(Runnable arg0, long arg1) `                                                                                                                                                                                                                                                                                                                                  | | ` abstract void`                                                                                                           | ` setAlpha(int arg0) `                                                                                                                                                                                                                                                                                                                                                      | | ` void`                                                                                                                    | ` setAutoMirrored(boolean arg0) `                                                                                                                                                                                                                                                                                                                                           | | ` void`                                                                                                                    | ` setBounds(int arg0, int arg1, int arg2, int arg3) `                                                                                                                                                                                                                                                                                                                       | | ` void`                                                                                                                    | ` setBounds(`[Rect](https://developer.android.com/reference/android/graphics/Rect.html)` arg0) `                                                                                                                                                                                                                                                                            | | ` final void`                                                                                                              | ` setCallback(`[Drawable.Callback](https://developer.android.com/reference/android/graphics/drawable/Drawable.Callback.html)` arg0) `                                                                                                                                                                                                                                       | | ` void`                                                                                                                    | ` setChangingConfigurations(int arg0) `                                                                                                                                                                                                                                                                                                                                     | | ` void`                                                                                                                    | ` setColorFilter(int arg0, `[PorterDuff.Mode](https://developer.android.com/reference/android/graphics/PorterDuff.Mode.html)` arg1) `                                                                                                                                                                                                                                       | | ` abstract void`                                                                                                           | ` setColorFilter(`[ColorFilter](https://developer.android.com/reference/android/graphics/ColorFilter.html)` arg0) `                                                                                                                                                                                                                                                         | | ` void`                                                                                                                    | ` setDither(boolean arg0) `                                                                                                                                                                                                                                                                                                                                                 | | ` void`                                                                                                                    | ` setFilterBitmap(boolean arg0) `                                                                                                                                                                                                                                                                                                                                           | | ` void`                                                                                                                    | ` setHotspot(float arg0, float arg1) `                                                                                                                                                                                                                                                                                                                                      | | ` void`                                                                                                                    | ` setHotspotBounds(int arg0, int arg1, int arg2, int arg3) `                                                                                                                                                                                                                                                                                                                | | ` final boolean`                                                                                                           | ` setLayoutDirection(int arg0) `                                                                                                                                                                                                                                                                                                                                            | | ` final boolean`                                                                                                           | ` setLevel(int arg0) `                                                                                                                                                                                                                                                                                                                                                      | | ` boolean`                                                                                                                 | ` setState(int[] arg0) `                                                                                                                                                                                                                                                                                                                                                    | | ` void`                                                                                                                    | ` setTint(int arg0) `                                                                                                                                                                                                                                                                                                                                                       | | ` void`                                                                                                                    | ` setTintList(`[ColorStateList](https://developer.android.com/reference/android/content/res/ColorStateList.html)` arg0) `                                                                                                                                                                                                                                                   | | ` void`                                                                                                                    | ` setTintMode(`[PorterDuff.Mode](https://developer.android.com/reference/android/graphics/PorterDuff.Mode.html)` arg0) `                                                                                                                                                                                                                                                    | | ` boolean`                                                                                                                 | ` setVisible(boolean arg0, boolean arg1) `                                                                                                                                                                                                                                                                                                                                  | | ` void`                                                                                                                    | ` unscheduleSelf(Runnable arg0) `                                                                                                                                                                                                                                                                                                                                           | ||
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/graphics/drawable/VectorDrawableCompat#)From class` java.lang.Object ` |-------------------|-------------------------------| | ` Object`         | ` clone() `                   | | ` boolean`        | ` equals(Object arg0) `       | | ` void`           | ` finalize() `                | | ` final Class<?>` | ` getClass() `                | | ` int`            | ` hashCode() `                | | ` final void`     | ` notify() `                  | | ` final void`     | ` notifyAll() `               | | ` String`         | ` toString() `                | | ` final void`     | ` wait(long arg0, int arg1) ` | | ` final void`     | ` wait(long arg0) `           | | ` final void`     | ` wait() `                    | ||

## Public methods

### applyTheme

```
void applyTheme (Resources.Theme t)
```

<br />

<br />

|          Parameters           ||
|-----|--------------------------|
| `t` | `Resources.Theme` <br /> |

### canApplyTheme

```
boolean canApplyTheme ()
```

<br />

<br />

|      Returns      ||
|-----------|--------|
| `boolean` | <br /> |

### clearColorFilter

```
void clearColorFilter ()
```

<br />

<br />

### create

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
VectorDrawableCompat create (Resources res, 
                int resId, 
                Resources.Theme theme)
```

Create a VectorDrawableCompat object.

<br />

|                                      Parameters                                       ||
|---------|------------------------------------------------------------------------------|
| `res`   | `Resources`: the resources. <br />                                           |
| `resId` | `int`: the resource ID for VectorDrawableCompat object. <br />               |
| `theme` | `Resources.Theme`: the theme of this vector drawable, it can be null. <br /> |

|                                                                                           Returns                                                                                            ||
|------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------|
| [VectorDrawableCompat](https://developer.android.com/reference/android/support/graphics/drawable/VectorDrawableCompat) | a new VectorDrawableCompat or null if parsing error is found. <br /> |

### createFromXmlInner

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
VectorDrawableCompat createFromXmlInner (Resources r, 
                XmlPullParser parser, 
                AttributeSet attrs, 
                Resources.Theme theme)
```

Create a VectorDrawableCompat from inside an XML document using an optional[Resources.Theme](https://developer.android.com/reference/android/content/res/Resources.Theme.html). Called on a parser positioned at a tag in an XML document, tries to create a Drawable from that tag. Returns`null`if the tag is not a valid drawable.

<br />

|             Parameters             ||
|----------|--------------------------|
| `r`      | `Resources` <br />       |
| `parser` | `XmlPullParser` <br />   |
| `attrs`  | `AttributeSet` <br />    |
| `theme`  | `Resources.Theme` <br /> |

|                                                            Returns                                                             ||
|------------------------------------------------------------------------------------------------------------------------|--------|
| [VectorDrawableCompat](https://developer.android.com/reference/android/support/graphics/drawable/VectorDrawableCompat) | <br /> |

|           Throws            ||
|--------------------------|---|
| `XmlPullParserException` |   |
| `IOException`            |   |

### draw

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void draw (Canvas canvas)
```

<br />

<br />

|        Parameters         ||
|----------|-----------------|
| `canvas` | `Canvas` <br /> |

### getAlpha

```
int getAlpha ()
```

<br />

<br />

|    Returns    ||
|-------|--------|
| `int` | <br /> |

### getChangingConfigurations

```
int getChangingConfigurations ()
```

<br />

<br />

|    Returns    ||
|-------|--------|
| `int` | <br /> |

### getColorFilter

```
ColorFilter getColorFilter ()
```

<br />

<br />

|                                             Returns                                              ||
|------------------------------------------------------------------------------------------|--------|
| [ColorFilter](https://developer.android.com/reference/android/graphics/ColorFilter.html) | <br /> |

### getConstantState

```
Drawable.ConstantState getConstantState ()
```

<br />

<br />

|                                                             Returns                                                             ||
|-------------------------------------------------------------------------------------------------------------------------|--------|
| [Drawable.ConstantState](https://developer.android.com/reference/android/graphics/drawable/Drawable.ConstantState.html) | <br /> |

### getCurrent

```
Drawable getCurrent ()
```

<br />

<br />

|                                               Returns                                               ||
|---------------------------------------------------------------------------------------------|--------|
| [Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html) | <br /> |

### getIntrinsicHeight

```
int getIntrinsicHeight ()
```

<br />

<br />

|    Returns    ||
|-------|--------|
| `int` | <br /> |

### getIntrinsicWidth

```
int getIntrinsicWidth ()
```

<br />

<br />

|    Returns    ||
|-------|--------|
| `int` | <br /> |

### getMinimumHeight

```
int getMinimumHeight ()
```

<br />

<br />

|    Returns    ||
|-------|--------|
| `int` | <br /> |

### getMinimumWidth

```
int getMinimumWidth ()
```

<br />

<br />

|    Returns    ||
|-------|--------|
| `int` | <br /> |

### getOpacity

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int getOpacity ()
```

<br />

<br />

|    Returns    ||
|-------|--------|
| `int` | <br /> |

### getPadding

```
boolean getPadding (Rect padding)
```

<br />

<br />

|        Parameters        ||
|-----------|---------------|
| `padding` | `Rect` <br /> |

|      Returns      ||
|-----------|--------|
| `boolean` | <br /> |

### getState

```
int[] getState ()
```

<br />

<br />

|     Returns     ||
|---------|--------|
| `int[]` | <br /> |

### getTransparentRegion

```
Region getTransparentRegion ()
```

<br />

<br />

|                                        Returns                                         ||
|--------------------------------------------------------------------------------|--------|
| [Region](https://developer.android.com/reference/android/graphics/Region.html) | <br /> |

### inflate

```
void inflate (Resources res, 
                XmlPullParser parser, 
                AttributeSet attrs, 
                Resources.Theme theme)
```

<br />

<br />

|             Parameters             ||
|----------|--------------------------|
| `res`    | `Resources` <br />       |
| `parser` | `XmlPullParser` <br />   |
| `attrs`  | `AttributeSet` <br />    |
| `theme`  | `Resources.Theme` <br /> |

|           Throws            ||
|--------------------------|---|
| `XmlPullParserException` |   |
| `IOException`            |   |

### inflate

```
void inflate (Resources res, 
                XmlPullParser parser, 
                AttributeSet attrs)
```

<br />

<br />

|            Parameters            ||
|----------|------------------------|
| `res`    | `Resources` <br />     |
| `parser` | `XmlPullParser` <br /> |
| `attrs`  | `AttributeSet` <br />  |

|           Throws            ||
|--------------------------|---|
| `XmlPullParserException` |   |
| `IOException`            |   |

### invalidateSelf

```
void invalidateSelf ()
```

<br />

<br />

### isAutoMirrored

```
boolean isAutoMirrored ()
```

<br />

<br />

|      Returns      ||
|-----------|--------|
| `boolean` | <br /> |

### isStateful

```
boolean isStateful ()
```

<br />

<br />

|      Returns      ||
|-----------|--------|
| `boolean` | <br /> |

### jumpToCurrentState

```
void jumpToCurrentState ()
```

<br />

<br />

### mutate

```
Drawable mutate ()
```

<br />

<br />

|                                               Returns                                               ||
|---------------------------------------------------------------------------------------------|--------|
| [Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html) | <br /> |

### scheduleSelf

```
void scheduleSelf (Runnable what, 
                long when)
```

<br />

<br />

|        Parameters         ||
|--------|-------------------|
| `what` | `Runnable` <br /> |
| `when` | `long` <br />     |

### setAlpha

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void setAlpha (int alpha)
```

<br />

<br />

|      Parameters       ||
|---------|--------------|
| `alpha` | `int` <br /> |

### setAutoMirrored

```
void setAutoMirrored (boolean mirrored)
```

<br />

<br />

|          Parameters          ||
|------------|------------------|
| `mirrored` | `boolean` <br /> |

### setChangingConfigurations

```
void setChangingConfigurations (int configs)
```

<br />

<br />

|       Parameters        ||
|-----------|--------------|
| `configs` | `int` <br /> |

### setColorFilter

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void setColorFilter (ColorFilter colorFilter)
```

<br />

<br />

|             Parameters              ||
|---------------|----------------------|
| `colorFilter` | `ColorFilter` <br /> |

### setColorFilter

```
void setColorFilter (int color, 
                PorterDuff.Mode mode)
```

<br />

<br />

|            Parameters             ||
|---------|--------------------------|
| `color` | `int` <br />             |
| `mode`  | `PorterDuff.Mode` <br /> |

### setFilterBitmap

```
void setFilterBitmap (boolean filter)
```

<br />

<br />

|         Parameters         ||
|----------|------------------|
| `filter` | `boolean` <br /> |

### setHotspot

```
void setHotspot (float x, 
                float y)
```

<br />

<br />

|     Parameters      ||
|-----|----------------|
| `x` | `float` <br /> |
| `y` | `float` <br /> |

### setHotspotBounds

```
void setHotspotBounds (int left, 
                int top, 
                int right, 
                int bottom)
```

<br />

<br />

|       Parameters       ||
|----------|--------------|
| `left`   | `int` <br /> |
| `top`    | `int` <br /> |
| `right`  | `int` <br /> |
| `bottom` | `int` <br /> |

### setState

```
boolean setState (int[] stateSet)
```

<br />

<br />

|        Parameters        ||
|------------|--------------|
| `stateSet` | `int` <br /> |

|      Returns      ||
|-----------|--------|
| `boolean` | <br /> |

### setTint

```
void setTint (int tint)
```

<br />

<br />

|      Parameters      ||
|--------|--------------|
| `tint` | `int` <br /> |

### setTintList

```
void setTintList (ColorStateList tint)
```

<br />

<br />

|           Parameters            ||
|--------|-------------------------|
| `tint` | `ColorStateList` <br /> |

### setTintMode

```
void setTintMode (PorterDuff.Mode tintMode)
```

<br />

<br />

|              Parameters              ||
|------------|--------------------------|
| `tintMode` | `PorterDuff.Mode` <br /> |

### setVisible

```
boolean setVisible (boolean visible, 
                boolean restart)
```

<br />

<br />

|         Parameters          ||
|-----------|------------------|
| `visible` | `boolean` <br /> |
| `restart` | `boolean` <br /> |

|      Returns      ||
|-----------|--------|
| `boolean` | <br /> |

### unscheduleSelf

```
void unscheduleSelf (Runnable what)
```

<br />

<br />

|        Parameters         ||
|--------|-------------------|
| `what` | `Runnable` <br /> |

## Protected methods

### onBoundsChange

```
void onBoundsChange (Rect bounds)
```

<br />

<br />

|       Parameters        ||
|----------|---------------|
| `bounds` | `Rect` <br /> |

### onLevelChange

```
boolean onLevelChange (int level)
```

<br />

<br />

|      Parameters       ||
|---------|--------------|
| `level` | `int` <br /> |

|      Returns      ||
|-----------|--------|
| `boolean` | <br /> |

### onStateChange

```
boolean onStateChange (int[] stateSet)
```

<br />

<br />

|        Parameters        ||
|------------|--------------|
| `stateSet` | `int` <br /> |

|      Returns      ||
|-----------|--------|
| `boolean` | <br /> |

-

  ## Interfaces

  - [Animatable2Compat](https://developer.android.com/reference/android/support/graphics/drawable/Animatable2Compat)
-

  ## Classes

  - [Animatable2Compat.AnimationCallback](https://developer.android.com/reference/android/support/graphics/drawable/Animatable2Compat.AnimationCallback)
  - [AnimatedVectorDrawableCompat](https://developer.android.com/reference/android/support/graphics/drawable/AnimatedVectorDrawableCompat)
  - [R](https://developer.android.com/reference/android/support/graphics/drawable/R)
  - [R.attr](https://developer.android.com/reference/android/support/graphics/drawable/R.attr)
  - [R.bool](https://developer.android.com/reference/android/support/graphics/drawable/R.bool)
  - [R.color](https://developer.android.com/reference/android/support/graphics/drawable/R.color)
  - [R.dimen](https://developer.android.com/reference/android/support/graphics/drawable/R.dimen)
  - [R.drawable](https://developer.android.com/reference/android/support/graphics/drawable/R.drawable)
  - [R.id](https://developer.android.com/reference/android/support/graphics/drawable/R.id)
  - [R.integer](https://developer.android.com/reference/android/support/graphics/drawable/R.integer)
  - [R.layout](https://developer.android.com/reference/android/support/graphics/drawable/R.layout)
  - [R.string](https://developer.android.com/reference/android/support/graphics/drawable/R.string)
  - [R.style](https://developer.android.com/reference/android/support/graphics/drawable/R.style)
  - [R.styleable](https://developer.android.com/reference/android/support/graphics/drawable/R.styleable)
  - [VectorDrawableCompat](https://developer.android.com/reference/android/support/graphics/drawable/VectorDrawableCompat)