Android TextView跑马灯效果
来源:互联网 发布:贵州广电网络标志 编辑:程序博客网 时间:2024/04/30 13:17
例:
<TextView
android:layout_width="100px"
android:layout_height="wrap_content"
android:text="@string/hello"
android:singleLine="true"
android:ellipsize="marquee"
android:marqueeRepeatLimit="marquee_forever"
android:focusable="true"
android:focusableInTouchMode="true"
/>
解释一下:
android:ellipsize="marquee"
textview中样式是跑马灯效果。
android:marqueeRepeatLimit="marquee_forever"
循环次数,这里是无限循环,可以根据需要写具体的次数,例如5。
android:singleLine="true"
textview中字体单行显示,否则会这行,不会出现跑马灯效果。
android:focusable="true"
android:focusableInTouchMode="true"
使textview获取焦点,这样字体就会自动滚动。
- Android TextView跑马灯效果
- Android TextView跑马灯效果
- Android TextView跑马灯效果
- Android TextView跑马灯效果
- [Android]TextView跑马灯效果
- Android textView 跑马灯效果
- android TextView 跑马灯效果
- Android TextView跑马灯效果
- Android TextView跑马灯效果
- Android TextView跑马灯效果
- android TextView跑马灯效果
- android TextView跑马灯效果
- Android TextView跑马灯效果
- Android TextView跑马灯效果
- android textView跑马灯效果
- Android TextView 跑马灯效果
- Android TextView跑马灯效果
- android textview 跑马灯效果
- 【笔试面试知识点查缺补漏深入理解之C与C++篇】指向函数的指针
- ActiveMQ安装与配置
- log4j将同类不同信息写入不同日志
- Bloom Filter概念和原理
- 提升SSL安全性的十个技巧
- Android TextView跑马灯效果
- 方法论 - Scrum
- android编译产生的apk或so不安装
- 字体闪烁特效
- Java多线程编程总结笔记——六线程的同步与锁
- 面试经验
- 视频编码技术杂谈
- 动态加载DLL(C#)
- 几种基本的数字正则表达式