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

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

 更新時間:2015年10月14日 11:13:11   作者:antkingwei  
這篇文章主要介紹了Android實現(xiàn)跑馬燈效果的方法,通過頁面XML布局設置實現(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程序設計有所幫助。

相關文章

最新評論