24.5Vector动态图的使用
24.5.1动态Vector基础
动态的Vector需要通过animated-vector标签来进行实现,它就像一个粘合剂,将控件与Vector图像粘合在了一起,一个基础的animated-vector代码如下所示:
<?xmlversion="1.0" encoding="utf-8"?>
<animated-vector xmlns:android="http://schemas.android.com/apk/res/android"
android:drawable="@drawable/vector_drawable">
<target
android:name="star"
android:animation="@animator/star_anim" />
</animated-vector>
目标图像是drawable//vector_drawable,name属性,就是在静态Vector图像中group或者path标签的name属性。
目标图像:
<vectorxmlns:android="http://schemas.