ViewFlipper 淘宝头条 轮播 自动切换
ViewFlipper介绍
常用API
- setInAnimation(Animation)与setInAnimation(Context, resourceID):设置View进入屏幕时候使用的动画
- setOutAnimation、getInAnimation、getOutAnimation:动画
- showNext、showPrevious:显示FrameLayout里面的下/上一个View
- getCurrentView:当前的View。Returns the View corresponding to the currently displayed child.
- setDisplayedChild、getDisplayedChild:正在显示的View的序号。Returns the index of the currently displayed child view.
- setAnimateFirstView(boolean animate)、getAnimateFirstView:True to animate the current View the first time it is displayed, false otherwise.
- 此外还有各种removeView方法。
查看ViewFlipper的源码可以看到,ViewFlipper主要用来实现View的自动切换。该类提供了如下几个主要的方法:
- setFilpInterval:设置View切换的时间间隔,参数为毫秒
- startFlipping:开始进行View的切换,切换会循环进行
- stopFlipping:停止View切换
- isFlipping: 用来判断View切换是否正在进行 。Returns true if the child views are flipping.
- setAutoStart:设置是否自动开始,如果设置为true,当ViewFlipper显示的时候View的切换会自动开始
- isAutoStart:是否为自动开始,Returns true if this view automatically calls startFlipping() when it becomes attached to a window.
案例
}
附件列表
ViewFlipper 淘宝头条 轮播 自动切换的更多相关文章
- js 实现淘宝无缝轮播图效果,可更改配置参数 带完整版解析代码[slider.js]
前言: 本人纯小白一个,有很多地方理解的没有各位大牛那么透彻,如有错误,请各位大牛指出斧正!小弟感激不尽. 本篇文章为您分析一下原生JS写淘宝无缝轮播图效果 需求分析: ...
- 原生JS实现淘宝无缝轮播
<!DOCTYPE html ><html><head><meta http-equiv="Content-Type" content=& ...
- 自定义控件 淘宝头条【ViewFlipper】
简易版 代码 ); tv.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { Acti ...
- 图片轮播(左右切换)--JS原生和jQuery实现
图片轮播(左右切换)--js原生和jquery实现 左右切换的做法基本步骤跟 上一篇文章 淡入淡出 类似,只不过修改了一些特定的部分 (1)首先是页面的结构部分 对于我这种左右切换式 1.首先是个外 ...
- jQuery五屏轮播手风琴切换代码
jQuery五屏轮播手风琴切换代码 在线演示本地下载
- JavaScript banner轮播 左右切换 圆点点击切换
1.效果如下图: 2.源码如下: <!DOCTYPE html> <html lang="en"> <head> <meta charse ...
- Android 仿淘宝头条竖直跑马灯式新闻标题及“分页思想
在淘宝App的首页中间位置,有一块小小的地方在不知疲倦地循坏滚动着头条标题(见下图的红框区域),这样的设计无疑能够在有限的手机屏幕上展示更丰富的内容.而实现这一功能需要用到的控件就是我在上一篇文章中提 ...
- Android仿淘宝头条滚动广告条
之前我使用TextView+Handler+动画,实现了一个简单的仿淘宝广告条的滚动,https://download.csdn.net/download/qq_35605213/9660825: 无 ...
- 【angularjs】使用angularjs模拟淘宝首页-淘宝头条滚动效果
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title> ...
随机推荐
- lr_start_transaction/lr_end_transaction事物组合
lr_start_transaction/lr_end_transaction事物组合 总结一下: lr_start_transaction与lr_end_transaction 为使用最多的事物创造 ...
- Could not apply the stored configuration for monitors
在用户目录下$user.home/.config/monitors.xml,要解决上面的问题,最简单的办法就是删除这个monitors.xml文件,重启一下电脑
- Java反序列化漏洞之殇
ref:https://xz.aliyun.com/t/2043 小结: 3.2.2版本之前的Apache-CommonsCollections存在该漏洞(不只该包)1.漏洞触发场景 在java编写的 ...
- 转:Meltdown Proof-of-Concept
转:https://github.com/IAIK/meltdown Meltdown Proof-of-Concept What is the difference between Meltdown ...
- HDU 6030 Happy Necklace
矩阵快速幂. 因为任意素数长度都要满足,所以$3$必须满足,$3$一旦满足,其余的肯定满足,也就是说只要考虑字符串末尾两位即可,$dp$一下就可以算方案数了.$n$较大,可以矩阵加速. #includ ...
- linux-ARM的几个使用指令
1.u-boot.bin arm-linux-gnueabi-objdump -D -b binary -m arm u-boot.bin > u-boot.s arm-linux-gnueab ...
- 【LeetCode two_pointer】11. Container With Most Water
Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). ...
- os.path.dirname(__file__)使用
os.path.dirname(__file__)使用 该测试脚本所在的位置:D:\第1层\第2层\第3层\第4层\第5层\test11.py test11.py import os #该文件所在位置 ...
- 【BZOJ 4665】 4665: 小w的喜糖 (DP+容斥)
4665: 小w的喜糖 Time Limit: 10 Sec Memory Limit: 128 MBSubmit: 94 Solved: 53 Description 废话不多说,反正小w要发喜 ...
- Properties Editor 中文编辑器 汉化
韩梦飞沙 韩亚飞 313134555@qq.com yue31313 han_meng_fei_sha 在Eclipse的 [Help]-> [ Install New Software ...