TextView跑马灯效果
来源:互联网 发布:网络数据包发送工具 编辑:程序博客网 时间:2024/06/11 14:22
自定义View 继承 TextView 重新
isFocused 方法
自定义View示例代码
import android.content.Context;import android.util.AttributeSet;import android.widget.TextView;public class HorseRaceLampTextView extends TextView { private static final String TAG = "AlwaysMarqueeTextView"; public HorseRaceLampTextView(Context context) { super(context); } public HorseRaceLampTextView(Context context, AttributeSet attrs) { super(context, attrs); } public HorseRaceLampTextView(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); } @Override public boolean isFocused() { return true; }}xml 代码示例<com.xxxx.xxx.HorseRaceLampTextViewandroid:layout_width="wrap_content"android:layout_height="wrap_content"android:maxLines="1"android:ellipsize="marquee"android:marqueeRepeatLimit="marquee_forever"/>singleLine = true已经被弃用 ,所以用的是 android:maxLines="1"ellipsize="marquee" 滚动的关键marqueeRepeatLimit = "marquee_forever" 一直重复滚动
0 0
- TextView跑马灯效果
- TextView跑马灯效果
- TextView跑马灯效果
- TextView跑马灯效果
- TextView跑马灯效果
- TextView跑马灯效果
- TextView 跑马灯效果
- TextView 跑马灯效果
- TextView跑马灯效果
- TextView跑马灯效果
- textview跑马灯效果
- textview跑马灯效果
- TextView跑马灯效果
- TextView跑马灯效果
- TextView跑马灯效果
- TextView跑马灯效果
- textview跑马灯效果
- TextView跑马灯效果
- 使用VS2008Express版本进行从外部程序启动的DLL调试方法
- [note]android studio创建工程
- 卓越员工对“怠惰”说不
- 使用QQ2013时连接Android物理设备Eclipse发现不了
- linux下安装VMware
- TextView跑马灯效果
- android4.3应用程序隐藏状态栏和标题栏
- 没有卑微的工作,只有卑微的工作态度
- Python学习笔记20
- Select2下拉框联动
- 大学食堂之HMM模型(三)——Baum-Walch算法
- 在Eclipse中设置进行JNI的头文件编译方法
- Activity堆栈管理器 以及 应用退出的两种方案
- AngularJs的controller 多次执行问题