我想要什么
我希望能够从没有路径的->目标中绘制一个向量。因此,例如,从零到检查标记SVG。
我试过什么
这是我的向量绘图:
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:height="128dp"
android:width="128dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:name="done"
android:pathData="M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z"
android:fillColor="#fff"
android:strokeWidth="1"
android:strokeLineCap="round"
android:strokeColor="#fff"/>
那只是一个复选标记SVG。
这是我的动画(我知道这是错误的)。*( )。从一个可绘制的向量到另一个矢量动画的路径数据必须有相同数量的路径方向:
<objectAnimator
android:duration="3000"
android:propertyName="pathData"
android:valueFrom="0"
android:valueTo="M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z"
android:valueType="pathType"
xmlns:android="http://schemas.android.com/apk/res/android" />和动画向量(将向量+动画结合在一起)
<?xml version="1.0" encoding="utf-8"?>
<animated-vector
xmlns:android="http://schemas.android.com/apk/res/android"
android:drawable="@drawable/ic_done">
<target
android:animation="@animator/ic_disappear"
android:name="opacity"/>
正如我前面所指出的,这是错误的。那么,我如何为SVG创建一个对象动画器,使其从没有路径动画到我想要的路径。此动画类似于绘制可绘图的人。
https://stackoverflow.com/questions/35571326
复制相似问题