TextView实现跑马灯效果
2017-04-12 23:40
232 查看
一、通过属性实现跑马灯效果
重要的代码
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:maxLines="1" android:singleLine="true" android:ellipsize="marquee" android:focusable="true" android:focusableInTouchMode="true" android:text="这是一个跑马灯示例!这是一个跑马灯示例!这是一个跑马灯示例!这是一个跑马灯示例!这是一个跑马灯示例!这是一个跑马灯示例!" />
重要的代码
android:singleLine="true" //设置为单行 android:ellipsize="marquee"//以横向滚动方式显示(需获得当前焦点时) android:focusable="true"//获取焦点 android:focusableInTouchMode="true"//通过toucth来获得focus
相关文章推荐
- TextView实现跑马灯效果
- Android实现多个TextView同时显示跑马灯效果
- Android重写TextView实现文字跑马灯效果
- ListView 中的TextView实现跑马灯效果
- Android实现多个TextView同时显示跑马灯效果
- Android常用UI编程_TextView实现跑马灯效果
- android用TextView实现跑马灯效果
- XML 实现 TextView的跑马灯效果
- ListView 中的TextView实现跑马灯效果
- 自定义TextView实现跑马灯效果
- TextView实现跑马灯效果
- TextView实现跑马灯效果
- 使同一界面的多个textview实现跑马灯效果
- android TextView实现跑马灯效果
- Android开发 TextView实现跑马灯效果
- android TextView的跑马灯效果的实现
- Android中TextView不获取焦点可以实现跑马灯的效果
- android在Gridview实现Textview跑马灯效果
- Android实现多个跑马灯效果,多个文本框TextView的跑马灯
- TextView实现跑马灯效果