我开始在android中学习动画,阅读https://developer.android.com/guide/topics/resources/animation-resource.html
发现xml和ValueAnimator中有两个元素
前者用于动画对象的属性,但与链接页面提供的定义混淆.这是:
"在指定的时间内执行动画.表示ValueAnimator"
这两个标签具有相同的属性:
<objectAnimator
android:propertyName="string"
android:duration="int"
android:valueFrom="float | int | color"
android:valueTo="float | int | color"
android:startOffset="int"
android:repeatCount="int"
android:repeatMode=["repeat" | "reverse"]
android:valueType=["intType" | "floatType"]/>
<animator
android:duration="int"
android:valueFrom="float | int | color"
android:valueTo="float | int | color"
android:startOffset="int"
android:repeatCount="int"
android:repeatMode=["repeat" | "reverse"]
android:valueType=["intType" | "floatType"]/>
Run Code Online (Sandbox Code Playgroud)
任何人都可以解释差异以及何时使用什么?任何答案和评论表示赞赏.