<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="18sp"
android:singleLine="true"
android:ellipsize="marquee"
android:marqueeRepeatLimit="marquee_forever"
android:focusable="true"
android:focusableInTouchMode="true"
android:text="跑马灯,就是类似于web一样,有一行字一直循环滚滚动这样,好吧还是看看 实现效果图,一看就懂的了~"/>
Reference:
2.7 TextView Realizing Marquee Effect
Part of the property introduction:
The realization of the marquee effect of the text in TextView, and the introduction of focusable and focusableInTouchMode properties