android 设置textview跑马灯效果
2015-10-30 17:09
357 查看
1、布局文件:
<TextView android:id="@+id/answer_no_lib_title" android:layout_width="fill_parent" android:layout_height="wrap_content"android:singleLine="true" android:ellipsize="marquee" android:textIsSelectable="true" android:text="加载中..."></TextView>
2、这样布局,需要点击该控件才会出现跑马灯效果
3、在代码中加如下代码,就自动出现跑马灯效果
mTitle.setSelected(true);
4、参考链接:
http://www.w-cun.com/post/jiantan_31933.htm
相关文章推荐
- Android 等待进度条
- View的touch事件分发。
- Please ensure that adb is correctly located at .... and can be executed
- 【Android开发精要笔记】Android组件模型解析
- 实现分享到QQ和QQ空间(Android)
- Android字符串进阶
- android打造仿qq控件可拉伸头部控件
- Android ListView功能扩展,实现高性能的瀑布流布局
- Android ListView异步加载图片乱序问题,原因分析及解决方案
- Android debug-you cannot combine custom titles with other title features
- Android 高清加载巨图方案 拒绝压缩图片
- 比真机还要快的genymotion
- Android 沉浸式状态栏攻略 让你的状态栏变色吧
- Android TagFlowLayout完全解析 一款针对Tag的布局
- 解决Android抽屉被击穿问题
- Volley 图片加载相关源码解析
- Android 开发实用方法大全
- Android平台Native开发与JNI机制详解
- 基于openfire+smack开发Android即时聊天应用[一]---openfire安装部署
- android笔记之receiver——广播