Skip to content

Latest commit

 

History

History

DrawableAnimations

Android DrawableAnimations Sample

A collection of demos for drawable animation APIs.

Home screen

SeekableAnimatedDrawable sample

APIs

AnimatedVectorDrawableCompat

AnimatedVectorDrawableCompat

AnimatedVectorDrawableCompat is backport of AnimatedVectorDrawable introduced in API level 21.

See AnimatedFragment.kt for how to use AnimatedVectorDrawableCompat.

When to use AnimatedVectorDrawableCompat instead of SeekableAnimatedVectorDrawable

When you use app:srcCompat in your layout XML, AppCompat instantiates AnimatedVectorDrawableCompat for older APIs. If you don't need to pause/resume or seek, this should be sufficient.

SeekableAnimatedVectorDrawable

SeekableAnimatedVectorDrawable

SeekableAnimatedVectorDrawable is an alternative to AnimatedVectorDrawableCompat that supports the same XML format. SeekableAnimatedVectorDrawable allows more control over animation, namely pause/resume and seek. It also provides animation callbacks for those additional events.

See SeekableFragment.kt for how to use SeekableAnimatedVectorDrawable.

Support

If you've found an error in this sample, please file an issue.

Patches are encouraged, and may be submitted by forking this project and submitting a pull request through GitHub. Please see CONTRIBUTING.md for more details.