<animation-list xmlns:android="http://schemas.android.com/apk/res/android"
android:oneshot="true">
增加android:oneshot="true"属性, 会停留在最后一帧你说的编辑框是指的EditText么, 可以设置android:editable="false"使之不可编辑
android:oneshot="true">
增加android:oneshot="true"属性, 会停留在最后一帧你说的编辑框是指的EditText么, 可以设置android:editable="false"使之不可编辑
解决方案 »
- android activity类实现了OnScrollListener接口时,listview滑到最低端时报错
- 如何构造pdu发短信
- android新手求帮助
- 移动网络设置 已启用数据 选项开关的编程实现
- 关于ExpandableListView用法问题
- SQLite创建表出错
- googleMap如何设置为英文?
- android 中如何 link 由 objcopy 生成的文件
- 网上很多人说都说:横屏切换到竖屏:(调用两次生命周期)。但是我自己写了一个demo,测试下了都是调用一次啊,为什么?
- 自定义的view如何跳转activity
- webview 加载图片和文字问题
- android serialport-api 数据丢失
我用了android:oneshot="true"的,每次运行都停在第一张
官网说明:http://developer.android.com/guide/topics/graphics/drawable-animation.html
<animation-list xmlns:android="http://schemas.android.com/apk/res/android"
android:oneshot="true">
<item android:drawable="@drawable/rocket_thrust1" android:duration="200" />
<item android:drawable="@drawable/rocket_thrust2" android:duration="200" />
<item android:drawable="@drawable/rocket_thrust3" android:duration="200" />
</animation-list>
This animation runs for just three frames. By setting the android:oneshot attribute of the list to true, it will cycle just once then stop and hold on the last frame.
(设置android:oneshot="true"后动画只执行一次, 并且停留在最后一帧)
我用的没问题哇...
duration 当前帧显示的时间(毫秒为单位)
oneshot 如果为true,表示动画只播放一次停止在最后一帧上,如果设置为false表示动画循环播放。
variablePadding If true, allows the drawable’s padding to change based on the current state that is selected.
visible 规定drawable的初始可见性,默认为flase;
你可以在程序里控制
boolean isOneShot() Void setOneShot(boolean oneshot)
获取oneshot属性
设置oneshot属性