I'm writing an Android application and I'd like to play a simple SVG animation. I'm aware that Android does not offer SVG support; what are my options here?
相关问题
- How can I create this custom Bottom Navigation on
- Bottom Navigation View gets Shrink Down
- How to make that the snackbar action button be sho
- Listening to outgoing sms not working android
- How to create Circular view on android wear?
相关文章
- android开发 怎么把图片放入drawable的文件夹下
- android上如何获取/storage/emulated/下的文件列表
- androidStudio有个箭头不认识
- SQLite不能创建表
- Windows - Android SDK manager not listing any plat
- Animate Recycler View grid when number of columns
- Why is the app closing suddenly without showing an
- Android OverlayItem.setMarker(): Change the marker
Starting from Android Lollipop (API level 21) it is possible to implement using AnimatedVectorDrawable.
There are also tools that will help to animate vector drawable shapeshifter and blog post from the author of the tool shapeshifter An Introduction to Icon Animation Techniques.
Use VectorDrawable. if target is under Lollipop use support library.
Add your downloaded XML file to your project and see how it looks. Heres an example of an VectorDrawable prepared for a rotation and path morph animation:
3 Now create a AnimatedVectorDrawable where you refer to the rotationGroup and path morph in the created VectorDrawable
4 Create two animators for the AnimatedVectorDrawable:
and :
(It is also possible to define all this in one file, refer to the docs here)
One way to then start the animation is by getting the drawable from the view and run
start()
.