This is the class for text whose content and markup can both be changed. (这是一个内容和标记都可以更改的文本类) 快速实现 直接看代码: @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); TextV…
TextView实现文字滚动需要以下几个要点: 1.文字长度长于可显示范围:android:singleLine="true" 2.设置可滚到,或显示样式:android:ellipsize="marquee" 3.自定义滚动的ScrollingTextView public class ScrollingTextView extends TextView { public ScrollingTextView(Context context, Attri…