A collection of demos for drawable animation APIs.
AnimatedVectorDrawableCompat is backport of AnimatedVectorDrawable introduced in API level 21.
See AnimatedFragment.kt for how to use AnimatedVectorDrawableCompat.
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 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.
- Stack Overflow: https://stackoverflow.com/questions/tagged/android
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.