ITeye博客

不用获得焦点也能实现跑马灯效果的textView

runfeel · 2011-10-26 15:34 · Markdown

/**
 * 这是一个不用获得焦点也能实现跑马灯效果的textView
 * @author Chenzt
 *
 */
public class MarqueeTextView extends TextView {
	public MarqueeTextView(Context con) {
		super(con);
	}

	public MarqueeTextView(Context context, AttributeSet attrs) {
		super(context, attrs);
	}

	public MarqueeTextView(Context context, AttributeSet attrs, int defStyle) {
		super(context, attrs, defStyle);
	}

	@Override
	public boolean isFocused() {
		return true;
	}

	@Override
	protected void onFocusChanged(boolean focused, int direction,
			Rect previouslyFocusedRect) {
	}
}

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。