标签:
转载请注明:[noyet12的博客](http://blog.csdn.net/u012975705)
博客原址:http://blog.csdn.net/u012975705/article/details/49998813
想要Android中fillAfter属生效,有2种写法
直接在代码中设置:
animation.setFillAfter(true);
在xml中设置,注意了:必须在中设置,否则无效
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:fillAfter="true">
<scale
android:duration="2000"
android:fromXScale="1.0"
android:fromYScale="1.0"
android:pivotX="50%"
android:pivotY="50%"
android:toXScale="0.0"
android:interpolator="@android:anim/accelerate_decelerate_interpolator"
android:toYScale="0.0"/>
<rotate
android:duration="2000"
android:fromDegrees="+360"
android:interpolator="@android:anim/accelerate_decelerate_interpolator"
android:pivotX="50%"
android:pivotY="50%"
android:toDegrees="0"/>
</set>
标签:
原文地址:http://blog.csdn.net/u012975705/article/details/49998813