/** Note : 自动文字滚动的TextView.需要配合以下属性使用:
* android:ellipsize="marquee" //文字长度超过文本框长度时滚动
* android:scrollHorizontally="true" //可以横向滚动
* android:marqueeRepeatLimit="marquee_forever" //滚动无限次
* android:singleLine="true" //单行文本属性
*
*/
public class AutoScrollTextView extends TextView {
public AutoScrollTextView(Context context) {
super(context);
}
public AutoScrollTextView(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
}
public AutoScrollTextView(Context context, AttributeSet attrs) {
super(context, attrs);
}
public boolean isFocused() {
return true;
}
}
Android - 自动文字滚动TextView
最新推荐文章于 2024-07-25 01:18:27 发布