AdapterViewFlipper 和 StackView的使用
2015-11-07 14:36
309 查看
AdapterViewFlipping
自动播放的图片库
继承了 AdapterViewAnimator ,【Animator:动画】也会显示Adapter提供的多个View组件,但是每次只能显示一个组件
android.widget.AdapterViewAnimator的XML属性
AdapterViewAnimator的XML属性
几个重要的公共方法:
showPrevious()//显示上一个组件
showNext()//显示下一个组件
startFlipping()//开始自动播放组件
stopFlipping()//停止自动播放
isFlipping()//如果返回true 则说明对象正在自动播放
StackView
同AdapterViewFlipper相同,StackView也是AdapterViewAnimator的子类
他的作用也和AdapterViewFlipping类似,只不过StackView是使用堆叠“Stack”
它也具有 showNext() showPrevious() 方法 但不具备自动播放的方法
我是看的《疯狂android讲义》学习的 所以暂时拿他当例子啦!
自动播放的图片库
继承了 AdapterViewAnimator ,【Animator:动画】也会显示Adapter提供的多个View组件,但是每次只能显示一个组件
android.widget.AdapterViewAnimator的XML属性
android:animateFirstView | Defines whether to animate the current View when the ViewAnimation is first displayed. 设置显示该组件的第一个View时是否使用动画 | |
android:inAnimation | Identifier for the animation to use when a view is shown. 设置组件显示时使用的动画 | |
android:loopViews | Defines whether the animator loops to the first view once it has reached the end of the list. 设置循环到最后一个组件后,是否从头开始循环 | |
android:outAnimation | Identifier for the animation to use when a view is hidden. 设置组件隐藏时使用的动画 |
android:autoStart | When true, automatically start animating Must be a boolean value, either "true" or " false". 设置组件是否自动播放。 | |
android:flipInterval | setFlipInterval(int) | 设置自动播放的时间间隔 ms毫秒 |
showPrevious()//显示上一个组件
showNext()//显示下一个组件
startFlipping()//开始自动播放组件
stopFlipping()//停止自动播放
isFlipping()//如果返回true 则说明对象正在自动播放
StackView
同AdapterViewFlipper相同,StackView也是AdapterViewAnimator的子类
他的作用也和AdapterViewFlipping类似,只不过StackView是使用堆叠“Stack”
它也具有 showNext() showPrevious() 方法 但不具备自动播放的方法
我是看的《疯狂android讲义》学习的 所以暂时拿他当例子啦!
相关文章推荐
- 解决UIToolbar 顶部的黑色线条问题
- 不同OpenCV版本和不同VS版本之间进行配置的注意事项
- java实现链表操作
- Markdown 语法说明 (简体中文版)
- 冒泡排序和选择排序
- Handler消息处理机制
- XX转Bitmap,XX转Drawable
- Xib
- 根据Excel的内容和word模板生成对应的word文档
- 虚方法的重写与普通方法的隐藏的区别;抽象方法和虚方法有什么区别?
- failed to load the jni shared jvm.dll
- 自然语言处理
- playframework 任务计划程序
- VC释放资源文件DLL,EXE等。。。
- 禁止表单自动提示缓存数据
- Android学习笔记--存储方案(SharedPreference、文件IO)
- python之smtplib模块 发送邮件
- android 判断滑动事件或者点击事件
- HDU3183 RMQ/贪心
- 顺序表的定义及基本操作