一、效果圖
二、實作代碼:
<TextView android:layout_width="100px"
android:layout_height="wrap_content"
android:textColor="@android:color/white"
android:ellipsize="marquee"
android:focusable="true"
android:marqueeRepeatLimit="marquee_forever"
android:focusableInTouchMode="true"
android:scrollHorizontally="true"
android:text="這才是真正的文字跑馬燈效果"
>
</TextView>
代碼說明:
a). 經測試與轉載文章差別主要在于這裡有設定android:focusableInTouchMode
b). 測試環境為Android1.5、模拟器。
三、後期維護
3.1 2013-07-01