真正实现TextView跑马灯效果
2011-08-18 16:00
375 查看
package com.lewa.launcher.widget.weather; import android.content.Context; import android.util.AttributeSet; import android.widget.TextView; public class LewatekWeatherTextView extends TextView { public LewatekWeatherTextView(Context context, AttributeSet attrs) { super(context, attrs); // TODO Auto-generated constructor stub } @Override public boolean isFocused() { //最关键的代码在此
return true; } }
最后xml文件中关于TextView必须的3个属性:
android:singleLine="true"
android:ellipsize="marquee"
android:marqueeRepeatLimit="marquee_forever"
相关文章推荐
- Android——TextView实现真正的跑马灯效果
- Android TextView实现滚动跑马灯效果Marquee
- 在Listview的textview实现跑马灯效果
- Android基于TextView属性android:ellipsize实现跑马灯效果的方法
- Android TextView实现跑马灯效果_1_1
- 实现跑马灯效果的TextView
- android TextView实现跑马灯效果
- 怎么实现textView的跑马灯的效果
- Android实现多个TextView同时显示跑马灯效果
- Android中TextView实现跑马灯效果
- TextView实现跑马灯效果
- TextView实现跑马灯效果 就这么简单!
- textview 显示图文信息,html文本,实现activity的跳转、跑马灯效果。
- Android-TextView跑马灯效果实现与分析
- Android自定义TextView实现跑马灯效果
- android TextView不用获得焦点实现跑马灯效果 两种方法
- Android TextView属性及跑马灯效果的实现
- 用textview实现跑马灯效果
- 使用TextView实现跑马灯效果
- Android:TextView不获取焦点可以实现跑马灯的效果