最簡單的跑馬燈效果
阿新 • • 發佈:2018-12-20
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android=“http://schemas.android.com/apk/res/android”
android:layout_width=“match_parent”
android:layout_height=“match_parent”>
<TextView android:singleLine="true" android:ellipsize="marquee" android:text="大王讓我來巡山,尋了南山尋北山,大王讓我來巡山,尋了南山尋北山,大王讓我來巡山,尋了南山尋北山,大王讓我來巡山,尋了南山尋北山" android:background="@color/colorAccent" android:textSize="30sp" android:textColor="#ffffff" android:padding="10dp" android:focusableInTouchMode="true" android:marqueeRepeatLimit="marquee_forever" android:focusable="true" android:layout_width="wrap_content" android:layout_height="wrap_content" />
</android.support.constraint.ConstraintLayout>