欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

Android實(shí)現(xiàn)跑馬燈效果的方法

 更新時(shí)間:2015年10月14日 11:13:11   作者:antkingwei  
這篇文章主要介紹了Android實(shí)現(xiàn)跑馬燈效果的方法,通過頁面XML布局設(shè)置實(shí)現(xiàn)帶有跑馬燈效果的文字滾動(dòng)顯示功能,具有一定參考借鑒價(jià)值,需要的朋友可以參考下

本文實(shí)例講述了Android實(shí)現(xiàn)跑馬燈效果的方法。分享給大家供大家參考。具體如下:

運(yùn)行效果截圖如下:

直接在布局里寫代碼就好了:

<TextView
   android:id="@+id/menu_desc"
   android:layout_width="300dip"
   android:layout_height="wrap_content"
   android:text="溫馨提示:左右滑動(dòng)更改菜單,點(diǎn)擊進(jìn)入"
   android:textColor="@color/white"
   android:textSize="22dip"
   android:singleLine="true"
   android:ellipsize="marquee"
   android:focusable="true"
   android:focusableInTouchMode="true"
   android:scrollHorizontally="true"
   android:marqueeRepeatLimit="marquee_forever"
   android:layout_centerHorizontal="true"
   android:layout_centerVertical="true"
   >
</TextView>

主要是這幾行:

android:singleLine="true"
android:ellipsize="marquee"
android:focusable="true"
android:focusableInTouchMode="true"
android:scrollHorizontally="true"
android:marqueeRepeatLimit="marquee_forever"

希望本文所述對(duì)大家的Android程序設(shè)計(jì)有所幫助。

相關(guān)文章

最新評(píng)論