在Animation的xml文档的创建:
先在项目的res下创建一个anim文件夹。然后在anim文件夹下创建xml文件。
alpha.xml
rotate.xml
< xml version="1.0" encoding="utf-8" >
android:interpolator="@android:anim/accelerate_interpolator"
>
android:toDegrees="+350"
android:pivotX="50%"
android:pivotY="50%"
android:duration="500"
/>
rotatex.ml中的android:pivotX参数的值
1、android.pivotX="50"这种方法使用绝对位置定位
2、android:pivotX="50%"这种方法使用相对于控件本身定位
3、android:pivotX="50%p"这种方法使用相对于控件的父控件定位