在Android Studio中若想实现跑马灯效果,只需要添加以下的代码:
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:ellipsize="marquee"
android:focusable="true"
android:focusableInTouchMode="true"
android:singleLine="true"
android:text="哈哈哈哈哈哈哈哈哈哈或或或或或或或或或或或不" />