# AnimatedVectorDrawableCompat

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

# AnimatedVectorDrawableCompat

| 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
AnimatedVectorDrawableCompat
`  
`


``

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


``


implements

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


`

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

<br />

*** ** * ** ***

For API 24 and above, this class is delegating to the framework's[AnimatedVectorDrawable](https://developer.android.com/reference/android/graphics/drawable/AnimatedVectorDrawable.html). For older API version, this class uses[ObjectAnimator](https://developer.android.com/reference/android/animation/ObjectAnimator.html)and[AnimatorSet](https://developer.android.com/reference/android/animation/AnimatorSet.html)to animate the properties of a[VectorDrawableCompat](https://developer.android.com/reference/android/support/graphics/drawable/VectorDrawableCompat)to create an animated drawable.

<br />

AnimatedVectorDrawableCompat are defined in the same XML format as[AnimatedVectorDrawable](https://developer.android.com/reference/android/graphics/drawable/AnimatedVectorDrawable.html).

<br />

Here are all the animatable attributes in[VectorDrawableCompat](https://developer.android.com/reference/android/support/graphics/drawable/VectorDrawableCompat):

|  Element Name  | Animatable attribute name |
|----------------|---------------------------|
| \<vector\>     | alpha                     |
| \<group\>      | rotation                  |
| \<group\>      | pivotX                    |
| \<group\>      | pivotY                    |
| \<group\>      | scaleX                    |
| \<group\>      | scaleY                    |
| \<group\>      | translateX                |
| \<group\>      | translateY                |
| \<path\>       | fillColor                 |
| \<path\>       | pathData                  |
| \<path\>       | strokeColor               |
| \<path\>       | strokeWidth               |
| \<path\>       | strokeAlpha               |
| \<path\>       | fillAlpha                 |
| \<path\>       | trimPathStart             |
| \<path\>       | trimPathEnd               |
| trimPathOffset |

<br />

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

<br />

Note that the animation in AnimatedVectorDrawableCompat now can support the following features:

- Path Morphing (PathType evaluator). This is used for morphing one path into another.
- Path Interpolation. This is used to defined a flexible interpolator (represented as a path) instead of the system defined ones like LinearInterpolator.
- Animating 2 values in one ObjectAnimator according to one path's X value and Y value. One usage is moving one object in both X and Y dimensions along an path.

<br />

## Summary

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ### Public methods                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ||
|--------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` void`                                                                                                                                          | ` `[applyTheme](https://developer.android.com/reference/android/support/graphics/drawable/AnimatedVectorDrawableCompat#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/AnimatedVectorDrawableCompat#canApplyTheme())`() `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| ` void`                                                                                                                                          | ` `[clearAnimationCallbacks](https://developer.android.com/reference/android/support/graphics/drawable/AnimatedVectorDrawableCompat#clearAnimationCallbacks())`() ` Removes all existing animation callbacks.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| ` static void`                                                                                                                                   | ` `[clearAnimationCallbacks](https://developer.android.com/reference/android/support/graphics/drawable/AnimatedVectorDrawableCompat#clearAnimationCallbacks(android.graphics.drawable.Drawable))`(`[Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html)` dr) ` Utility function to clear animation callbacks from Drawable, when the drawable is created from XML and referred in Java code, e.g: ImageView.getDrawable().                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| ` void`                                                                                                                                          | ` `[clearColorFilter](https://developer.android.com/reference/android/support/graphics/drawable/AnimatedVectorDrawableCompat#clearColorFilter())`() `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| ` static `[AnimatedVectorDrawableCompat](https://developer.android.com/reference/android/support/graphics/drawable/AnimatedVectorDrawableCompat) | ` `[create](https://developer.android.com/reference/android/support/graphics/drawable/AnimatedVectorDrawableCompat#create(android.content.Context, int))`(`[Context](https://developer.android.com/reference/android/content/Context.html)` context, int resId) ` Create a AnimatedVectorDrawableCompat object.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| ` static `[AnimatedVectorDrawableCompat](https://developer.android.com/reference/android/support/graphics/drawable/AnimatedVectorDrawableCompat) | ` `[createFromXmlInner](https://developer.android.com/reference/android/support/graphics/drawable/AnimatedVectorDrawableCompat#createFromXmlInner(android.content.Context, android.content.res.Resources, org.xmlpull.v1.XmlPullParser, android.util.AttributeSet, android.content.res.Resources.Theme))`(`[Context](https://developer.android.com/reference/android/content/Context.html)` context, `[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 AnimatedVectorDrawableCompat 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/AnimatedVectorDrawableCompat#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/AnimatedVectorDrawableCompat#getAlpha())`() `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| ` int`                                                                                                                                           | ` `[getChangingConfigurations](https://developer.android.com/reference/android/support/graphics/drawable/AnimatedVectorDrawableCompat#getChangingConfigurations())`() `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| ` `[ColorFilter](https://developer.android.com/reference/android/graphics/ColorFilter.html)                                                      | ` `[getColorFilter](https://developer.android.com/reference/android/support/graphics/drawable/AnimatedVectorDrawableCompat#getColorFilter())`() `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| ` `[Drawable.ConstantState](https://developer.android.com/reference/android/graphics/drawable/Drawable.ConstantState.html)                       | ` `[getConstantState](https://developer.android.com/reference/android/support/graphics/drawable/AnimatedVectorDrawableCompat#getConstantState())`() ` **Note**that we don't support constant state when SDK \< 24.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| ` `[Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html)                                                   | ` `[getCurrent](https://developer.android.com/reference/android/support/graphics/drawable/AnimatedVectorDrawableCompat#getCurrent())`() `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| ` int`                                                                                                                                           | ` `[getIntrinsicHeight](https://developer.android.com/reference/android/support/graphics/drawable/AnimatedVectorDrawableCompat#getIntrinsicHeight())`() `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| ` int`                                                                                                                                           | ` `[getIntrinsicWidth](https://developer.android.com/reference/android/support/graphics/drawable/AnimatedVectorDrawableCompat#getIntrinsicWidth())`() `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| ` int`                                                                                                                                           | ` `[getMinimumHeight](https://developer.android.com/reference/android/support/graphics/drawable/AnimatedVectorDrawableCompat#getMinimumHeight())`() `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| ` int`                                                                                                                                           | ` `[getMinimumWidth](https://developer.android.com/reference/android/support/graphics/drawable/AnimatedVectorDrawableCompat#getMinimumWidth())`() `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| ` int`                                                                                                                                           | ` `[getOpacity](https://developer.android.com/reference/android/support/graphics/drawable/AnimatedVectorDrawableCompat#getOpacity())`() `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| ` boolean`                                                                                                                                       | ` `[getPadding](https://developer.android.com/reference/android/support/graphics/drawable/AnimatedVectorDrawableCompat#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/AnimatedVectorDrawableCompat#getState())`() `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| ` `[Region](https://developer.android.com/reference/android/graphics/Region.html)                                                                | ` `[getTransparentRegion](https://developer.android.com/reference/android/support/graphics/drawable/AnimatedVectorDrawableCompat#getTransparentRegion())`() `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| ` void`                                                                                                                                          | ` `[inflate](https://developer.android.com/reference/android/support/graphics/drawable/AnimatedVectorDrawableCompat#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/AnimatedVectorDrawableCompat#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) `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| ` boolean`                                                                                                                                       | ` `[isAutoMirrored](https://developer.android.com/reference/android/support/graphics/drawable/AnimatedVectorDrawableCompat#isAutoMirrored())`() `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| ` boolean`                                                                                                                                       | ` `[isRunning](https://developer.android.com/reference/android/support/graphics/drawable/AnimatedVectorDrawableCompat#isRunning())`() `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| ` boolean`                                                                                                                                       | ` `[isStateful](https://developer.android.com/reference/android/support/graphics/drawable/AnimatedVectorDrawableCompat#isStateful())`() `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| ` void`                                                                                                                                          | ` `[jumpToCurrentState](https://developer.android.com/reference/android/support/graphics/drawable/AnimatedVectorDrawableCompat#jumpToCurrentState())`() `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| ` `[Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html)                                                   | ` `[mutate](https://developer.android.com/reference/android/support/graphics/drawable/AnimatedVectorDrawableCompat#mutate())`() ` mutate() will be effective only if the getConstantState() is returning non-null.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| ` static void`                                                                                                                                   | ` `[registerAnimationCallback](https://developer.android.com/reference/android/support/graphics/drawable/AnimatedVectorDrawableCompat#registerAnimationCallback(android.graphics.drawable.Drawable, android.support.graphics.drawable.Animatable2Compat.AnimationCallback))`(`[Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html)` dr, `[Animatable2Compat.AnimationCallback](https://developer.android.com/reference/android/support/graphics/drawable/Animatable2Compat.AnimationCallback)` callback) ` Utility function to register callback to Drawable, when the drawable is created from XML and referred in Java code, e.g: ImageView.getDrawable().                                                                                                                                                                                                                            |
| ` void`                                                                                                                                          | ` `[registerAnimationCallback](https://developer.android.com/reference/android/support/graphics/drawable/AnimatedVectorDrawableCompat#registerAnimationCallback(android.support.graphics.drawable.Animatable2Compat.AnimationCallback))`(`[Animatable2Compat.AnimationCallback](https://developer.android.com/reference/android/support/graphics/drawable/Animatable2Compat.AnimationCallback)` callback) ` Adds a callback to listen to the animation events.                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| ` void`                                                                                                                                          | ` `[setAlpha](https://developer.android.com/reference/android/support/graphics/drawable/AnimatedVectorDrawableCompat#setAlpha(int))`(int alpha) `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| ` void`                                                                                                                                          | ` `[setAutoMirrored](https://developer.android.com/reference/android/support/graphics/drawable/AnimatedVectorDrawableCompat#setAutoMirrored(boolean))`(boolean mirrored) `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| ` void`                                                                                                                                          | ` `[setChangingConfigurations](https://developer.android.com/reference/android/support/graphics/drawable/AnimatedVectorDrawableCompat#setChangingConfigurations(int))`(int configs) `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| ` void`                                                                                                                                          | ` `[setColorFilter](https://developer.android.com/reference/android/support/graphics/drawable/AnimatedVectorDrawableCompat#setColorFilter(int, android.graphics.PorterDuff.Mode))`(int color, `[PorterDuff.Mode](https://developer.android.com/reference/android/graphics/PorterDuff.Mode.html)` mode) `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| ` void`                                                                                                                                          | ` `[setColorFilter](https://developer.android.com/reference/android/support/graphics/drawable/AnimatedVectorDrawableCompat#setColorFilter(android.graphics.ColorFilter))`(`[ColorFilter](https://developer.android.com/reference/android/graphics/ColorFilter.html)` colorFilter) `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| ` void`                                                                                                                                          | ` `[setFilterBitmap](https://developer.android.com/reference/android/support/graphics/drawable/AnimatedVectorDrawableCompat#setFilterBitmap(boolean))`(boolean filter) `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| ` void`                                                                                                                                          | ` `[setHotspot](https://developer.android.com/reference/android/support/graphics/drawable/AnimatedVectorDrawableCompat#setHotspot(float, float))`(float x, float y) `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| ` void`                                                                                                                                          | ` `[setHotspotBounds](https://developer.android.com/reference/android/support/graphics/drawable/AnimatedVectorDrawableCompat#setHotspotBounds(int, int, int, int))`(int left, int top, int right, int bottom) `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| ` boolean`                                                                                                                                       | ` `[setState](https://developer.android.com/reference/android/support/graphics/drawable/AnimatedVectorDrawableCompat#setState(int[]))`(int[] stateSet) `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| ` void`                                                                                                                                          | ` `[setTint](https://developer.android.com/reference/android/support/graphics/drawable/AnimatedVectorDrawableCompat#setTint(int))`(int tint) `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| ` void`                                                                                                                                          | ` `[setTintList](https://developer.android.com/reference/android/support/graphics/drawable/AnimatedVectorDrawableCompat#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/AnimatedVectorDrawableCompat#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/AnimatedVectorDrawableCompat#setVisible(boolean, boolean))`(boolean visible, boolean restart) `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| ` void`                                                                                                                                          | ` `[start](https://developer.android.com/reference/android/support/graphics/drawable/AnimatedVectorDrawableCompat#start())`() `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| ` void`                                                                                                                                          | ` `[stop](https://developer.android.com/reference/android/support/graphics/drawable/AnimatedVectorDrawableCompat#stop())`() `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| ` boolean`                                                                                                                                       | ` `[unregisterAnimationCallback](https://developer.android.com/reference/android/support/graphics/drawable/AnimatedVectorDrawableCompat#unregisterAnimationCallback(android.support.graphics.drawable.Animatable2Compat.AnimationCallback))`(`[Animatable2Compat.AnimationCallback](https://developer.android.com/reference/android/support/graphics/drawable/Animatable2Compat.AnimationCallback)` callback) ` Removes the specified animation callback.                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| ` static boolean`                                                                                                                                | ` `[unregisterAnimationCallback](https://developer.android.com/reference/android/support/graphics/drawable/AnimatedVectorDrawableCompat#unregisterAnimationCallback(android.graphics.drawable.Drawable, android.support.graphics.drawable.Animatable2Compat.AnimationCallback))`(`[Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html)` dr, `[Animatable2Compat.AnimationCallback](https://developer.android.com/reference/android/support/graphics/drawable/Animatable2Compat.AnimationCallback)` callback) ` Utility function to unregister animation callback from Drawable, when the drawable is created from XML and referred in Java code, e.g: ImageView.getDrawable().                                                                                                                                                                                                          |

|                                                                                                                         ### Protected methods                                                                                                                         ||
|------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` void`    | ` `[onBoundsChange](https://developer.android.com/reference/android/support/graphics/drawable/AnimatedVectorDrawableCompat#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/AnimatedVectorDrawableCompat#onLevelChange(int))`(int level) `                                                                                               |
| ` boolean` | ` `[onStateChange](https://developer.android.com/reference/android/support/graphics/drawable/AnimatedVectorDrawableCompat#onStateChange(int[]))`(int[] state) `                                                                                           |

| ### Inherited methods |
|-----------------------|---|
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/graphics/drawable/AnimatedVectorDrawableCompat#)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/AnimatedVectorDrawableCompat#)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() `                    | ||
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/graphics/drawable/AnimatedVectorDrawableCompat#)From interface` `[android.support.graphics.drawable.Animatable2Compat](https://developer.android.com/reference/android/support/graphics/drawable/Animatable2Compat)` ` |---------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` abstract void`    | ` `[clearAnimationCallbacks](https://developer.android.com/reference/android/support/graphics/drawable/Animatable2Compat#clearAnimationCallbacks())`() ` Removes all existing animation callbacks.                                                                                                                                                                                                                                                  | | ` abstract void`    | ` `[registerAnimationCallback](https://developer.android.com/reference/android/support/graphics/drawable/Animatable2Compat#registerAnimationCallback(android.support.graphics.drawable.Animatable2Compat.AnimationCallback))`(`[Animatable2Compat.AnimationCallback](https://developer.android.com/reference/android/support/graphics/drawable/Animatable2Compat.AnimationCallback)` callback) ` Adds a callback to listen to the animation events. | | ` abstract boolean` | ` `[unregisterAnimationCallback](https://developer.android.com/reference/android/support/graphics/drawable/Animatable2Compat#unregisterAnimationCallback(android.support.graphics.drawable.Animatable2Compat.AnimationCallback))`(`[Animatable2Compat.AnimationCallback](https://developer.android.com/reference/android/support/graphics/drawable/Animatable2Compat.AnimationCallback)` callback) ` Removes the specified animation callback.      | ||
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/graphics/drawable/AnimatedVectorDrawableCompat#)From interface` `[android.graphics.drawable.Animatable](https://developer.android.com/reference/android/graphics/drawable/Animatable.html)` ` |---------------------|-----------------| | ` abstract boolean` | ` isRunning() ` | | ` abstract void`    | ` start() `     | | ` abstract void`    | ` stop() `      | ||

## Public methods

### applyTheme

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

<br />

<br />

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

### canApplyTheme

```
boolean canApplyTheme ()
```

<br />

<br />

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

### clearAnimationCallbacks

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

```
void clearAnimationCallbacks ()
```

Removes all existing animation callbacks.

<br />

### clearAnimationCallbacks

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

```
void clearAnimationCallbacks (Drawable dr)
```

Utility function to clear animation callbacks from Drawable, when the drawable is created from XML and referred in Java code, e.g: ImageView.getDrawable(). From API 24 on, the drawable is treated as an AnimatedVectorDrawable. Otherwise, it is treated as AnimatedVectorDrawableCompat.

<br />

|       Parameters        ||
|------|-------------------|
| `dr` | `Drawable` <br /> |

### clearColorFilter

```
void clearColorFilter ()
```

<br />

<br />

### create

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

```
AnimatedVectorDrawableCompat create (Context context, 
                int resId)
```

Create a AnimatedVectorDrawableCompat object.

<br />

|                                    Parameters                                     ||
|-----------|------------------------------------------------------------------------|
| `context` | `Context`: the context for creating the animators. <br />              |
| `resId`   | `int`: the resource ID for AnimatedVectorDrawableCompat object. <br /> |

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

### createFromXmlInner

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

```
AnimatedVectorDrawableCompat createFromXmlInner (Context context, 
                Resources r, 
                XmlPullParser parser, 
                AttributeSet attrs, 
                Resources.Theme theme)
```

Create a AnimatedVectorDrawableCompat 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              ||
|-----------|--------------------------|
| `context` | `Context` <br />         |
| `r`       | `Resources` <br />       |
| `parser`  | `XmlPullParser` <br />   |
| `attrs`   | `AttributeSet` <br />    |
| `theme`   | `Resources.Theme` <br /> |

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

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

### draw

added in[version 25.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 ()
```

**Note**that we don't support constant state when SDK \< 24. Make sure you check the return value before using it.

<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 25.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`            |   |

### isAutoMirrored

```
boolean isAutoMirrored ()
```

<br />

<br />

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

### isRunning

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

```
boolean isRunning ()
```

<br />

<br />

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

### isStateful

```
boolean isStateful ()
```

<br />

<br />

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

### jumpToCurrentState

```
void jumpToCurrentState ()
```

<br />

<br />

### mutate

```
Drawable mutate ()
```

mutate() will be effective only if the getConstantState() is returning non-null. Otherwise, it just return the current object without modification.

<br />

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

### registerAnimationCallback

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

```
void registerAnimationCallback (Drawable dr, 
                Animatable2Compat.AnimationCallback callback)
```

Utility function to register callback to Drawable, when the drawable is created from XML and referred in Java code, e.g: ImageView.getDrawable(). From API 24 on, the drawable is treated as an AnimatedVectorDrawable. Otherwise, it is treated as AnimatedVectorDrawableCompat.

<br />

|                        Parameters                        ||
|------------|----------------------------------------------|
| `dr`       | `Drawable` <br />                            |
| `callback` | `Animatable2Compat.AnimationCallback` <br /> |

### registerAnimationCallback

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

```
void registerAnimationCallback (Animatable2Compat.AnimationCallback callback)
```

Adds a callback to listen to the animation events.

<br />

|                                 Parameters                                 ||
|------------|----------------------------------------------------------------|
| `callback` | `Animatable2Compat.AnimationCallback`: Callback to add. <br /> |

### setAlpha

added in[version 25.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

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

<br />

<br />

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

### setColorFilter

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

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

<br />

<br />

|             Parameters              ||
|---------------|----------------------|
| `colorFilter` | `ColorFilter` <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 /> |

### start

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

```
void start ()
```

<br />

<br />

### stop

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

```
void stop ()
```

<br />

<br />

### unregisterAnimationCallback

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

```
boolean unregisterAnimationCallback (Animatable2Compat.AnimationCallback callback)
```

Removes the specified animation callback.

<br />

|                                  Parameters                                   ||
|------------|-------------------------------------------------------------------|
| `callback` | `Animatable2Compat.AnimationCallback`: Callback to remove. <br /> |

|                                                           Returns                                                           ||
|-----------|------------------------------------------------------------------------------------------------------------------|
| `boolean` | `false`if callback didn't exist in the call back list, or`true`if callback has been removed successfully. <br /> |

### unregisterAnimationCallback

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

```
boolean unregisterAnimationCallback (Drawable dr, 
                Animatable2Compat.AnimationCallback callback)
```

Utility function to unregister animation callback from Drawable, when the drawable is created from XML and referred in Java code, e.g: ImageView.getDrawable(). From API 24 on, the drawable is treated as an AnimatedVectorDrawable. Otherwise, it is treated as AnimatedVectorDrawableCompat.

<br />

|                        Parameters                        ||
|------------|----------------------------------------------|
| `dr`       | `Drawable` <br />                            |
| `callback` | `Animatable2Compat.AnimationCallback` <br /> |

|      Returns      ||
|-----------|--------|
| `boolean` | <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[] state)
```

<br />

<br />

|      Parameters       ||
|---------|--------------|
| `state` | `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)