亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

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

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

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

運行效果截圖如下:

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

<TextView
   android:id="@+id/menu_desc"
   android:layout_width="300dip"
   android:layout_height="wrap_content"
   android:text="溫馨提示:左右滑動更改菜單,點擊進入"
   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"

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

相關(guān)文章

最新評論