Android don';t正常缩放动画
我想创建一个如下所示的动画: 它从左下角缩放到右上角 以下是我目前的代码:Android don';t正常缩放动画,android,scale,android-animation,Android,Scale,Android Animation,我想创建一个如下所示的动画: 它从左下角缩放到右上角 以下是我目前的代码: <set xmlns:android="http://schemas.android.com/apk/res/android" > <scale android:duration="500" android:fillAfter="true" android:fromXScale="0.0" android:fromYScale="1.0" android:toX
<set xmlns:android="http://schemas.android.com/apk/res/android" >
<scale
android:duration="500"
android:fillAfter="true"
android:fromXScale="0.0"
android:fromYScale="1.0"
android:toXScale="1.0"
android:toYScale="1.0"
>
</scale>
</set>
有关于如何制作动画的教程吗?我理解这个概念,但我不知道所有的变量,比如pivotX和pivotY。试试这个 这里我将动画设置为image 在res目录中创建名为anim的新文件夹,并保存动画xml 使用
AnimationUtils.loadAnimation(this,R.anim.xmlname)代码>
我所做的是使用pivotX和pivotY:
<scale
android:duration="300"
android:fillAfter="true"
android:fromXScale="0.0"
android:fromYScale="0.0"
android:toXScale="1.0"
android:toYScale="1.0"
android:pivotX="0%"
android:pivotY="100%"
>
</scale>
枢轴是动画的起点
<scale
android:duration="300"
android:fillAfter="true"
android:fromXScale="0.0"
android:fromYScale="0.0"
android:toXScale="1.0"
android:toYScale="1.0"
android:pivotX="0%"
android:pivotY="100%"
>
</scale>