使android:fillAfter="true"在xml中起作用
2015-02-13 14:53
429 查看
网上很多人都说android:fillAfter="true"这一属性在xml中设置使动画保持在播放的最后一帧不起作用,只能通过java代码来实现,其实这是一种误导。主要是在加这一属性的时候必须加在<set>标签这里才起作用,代码如下:
<?xml version="1.0" encoding="utf-8"?> <set xmlns:android="http://schemas.android.com/apk/res/android" android:fillEnabled="true" android:fillAfter="true"> <translate android:interpolator="@android:anim/cycle_interpolator" android:fromXDelta="0" android:toXDelta="200" android:fromYDelta="0" android:toYDelta="-50" android:duration="10000" > </translate> </set>
相关文章推荐
- 使android:fillAfter="true"在xml中起作用
- 使android:fillAfter="true"在xml中起作用
- 使android:fillAfter=&quot;true&quot;在xml…
- ScrollView中添加一个android:fillViewport="true"
- ScrollView的android:fillViewport="true"
- Android 技术总结(004)—— ScrollView中的组件设置android:layout_height="fill_parent"不起作用的解决办法
- android:fillViewport=\"true\"
- android 布局xml中 android:fitsSystemWindows="true"
- ScrollView中添加一个android:fillViewport="true"
- scrollview中android:fillviewpoint="true"内容不足以滚动视图时,使其内容撑满屏幕
- android中关于scrollview内部组件android:layout_height="fill_parent"无效的解决办法
- Android中String.xml: The reference to entity "timestamp" must end with the ';' delimiter
- AndroidMenifest.xml中android:sharedUserId="android.uid.system权限问题
- c#设置xml空节点不换行;添加属性为xsi:nil="true"的空节点
- 自定义ListView FastScroller滑块图片 以及 android:fastScrollEnabled="true" 不起作用
- Android常见问题分析之自定义ListView FastScroller滑块图片 以及 android:fastScrollEnabled="true" 不起作用
- Android中RelativeLayout各个属性 android:layout_alignParentLeft="true"找不到有时候
- XML解析之xsi:nil="true"
- 关于android xml文件中 android:id="@+id/my_button"的含义疑问
- android:layout_gravity="bottom"不起作用问题