Android實現(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程序設計有所幫助。
相關文章
android基于dialog實現(xiàn)等待加載框示例
本篇文章主要介紹了android基于dialog實現(xiàn)等待加載框示例,小編覺得挺不錯的,現(xiàn)在分享給大家,也給大家做個參考。一起跟隨小編過來看看吧2017-02-02
android studio 打包自動生成版本號與日期,apk輸入路徑詳解
這篇文章主要介紹了android studio 打包自動生成版本號與日期,apk輸入路徑詳解,具有很好的參考價值,希望對大家有所幫助。一起跟隨小編過來看看吧2020-03-03
Android使用ShareSDK實現(xiàn)應用分享的功能
這篇文章主要為大家詳細介紹了Android使用ShareSDK實現(xiàn)應用分享的功能,具有一定的參考價值,感興趣的小伙伴們可以參考一下2018-05-05
Android中APK簽名工具之jarsigner和apksigner詳解
這篇文章主要給大家介紹了關于Android中APK簽名工具之jarsigner和apksigner的相關資料,文中介紹的非常詳細,對各位Android開發(fā)者們具有一定的參考學習價值,需要的朋友們下面隨著小編來一起學習學習吧2018-06-06

