Android开发中通过使用TextView实现一个字体滚动效果-创新互联
这篇文章给大家介绍 Android开发中通过使用TextView实现一个字体滚动效果,内容非常详细,感兴趣的小伙伴们可以参考借鉴,希望对大家能有所帮助。
Android TextView 字体滚动效果
实例代码:
package com.godinsec.seland.ui.tools; import android.content.Context; import android.text.TextUtils.TruncateAt; import android.util.AttributeSet; import android.widget.TextView; public class MarqueTextView extends TextView { public MarqueTextView(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); init(context); } public MarqueTextView(Context context, AttributeSet attrs) { super(context, attrs); init(context); } public MarqueTextView(Context context) { super(context); init(context); } private void init(Context context) { setEllipsize(TruncateAt.MARQUEE) ; } @Override public boolean isFocused() { return true; } }
名称栏目:Android开发中通过使用TextView实现一个字体滚动效果-创新互联
标题链接:http://myzitong.com/article/ccsdse.html