Android實(shí)現(xiàn)跑馬燈效果的方法
本文實(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ì)有所幫助。
- Android 中TextView中跑馬燈效果的實(shí)現(xiàn)方法
- Android TextView實(shí)現(xiàn)跑馬燈效果的方法
- Android自定義View實(shí)現(xiàn)豎直跑馬燈效果案例解析
- Android實(shí)現(xiàn)圖文垂直跑馬燈效果
- Android自定義textview實(shí)現(xiàn)豎直滾動(dòng)跑馬燈效果
- Android中使用TextView實(shí)現(xiàn)文字跑馬燈效果
- Android基于TextView不獲取焦點(diǎn)實(shí)現(xiàn)跑馬燈效果
- Android跑馬燈MarqueeView源碼解析
- android自定義View實(shí)現(xiàn)跑馬燈效果
- Android自定義可控制速度的跑馬燈
相關(guān)文章
Android Location服務(wù)之LocationManager案例詳解
這篇文章主要介紹了Android Location服務(wù)之LocationManager案例詳解,本篇文章通過簡(jiǎn)要的案例,講解了該項(xiàng)技術(shù)的了解與使用,以下就是詳細(xì)內(nèi)容,需要的朋友可以參考下2021-08-08Android通過命令連接wifi的方法(解決usb不能用問題)
這篇文章主要介紹了Android通過命令連接wifi的方法(解決usb不能用的情況),本文通過實(shí)例代碼給大家介紹的非常詳細(xì),具有一定的參考借鑒價(jià)值,需要的朋友可以參考下2020-02-02Android編程實(shí)現(xiàn)下載時(shí)主界面與詳細(xì)界面一致更新的方法
這篇文章主要介紹了Android編程實(shí)現(xiàn)下載時(shí)主界面與詳細(xì)界面一致更新的方法,涉及Android事件監(jiān)聽及界面動(dòng)態(tài)更新相關(guān)操作技巧,需要的朋友可以參考下2017-11-11Android中使用Service實(shí)現(xiàn)后臺(tái)發(fā)送郵件功能實(shí)例
這篇文章主要介紹了Android中使用Service實(shí)現(xiàn)后臺(tái)發(fā)送郵件功能的方法,結(jié)合實(shí)例形式分析了Service實(shí)現(xiàn)郵件的發(fā)送、接收及權(quán)限控制相關(guān)技巧,需要的朋友可以參考下2016-01-01Android手機(jī)屏幕px與dp互轉(zhuǎn)的工具類
今天小編就為大家分享一篇關(guān)于Android手機(jī)屏幕px與dp互轉(zhuǎn)的工具類,小編覺得內(nèi)容挺不錯(cuò)的,現(xiàn)在分享給大家,具有很好的參考價(jià)值,需要的朋友一起跟隨小編來看看吧2019-03-03Android中ToggleButton開關(guān)狀態(tài)按鈕控件使用方法詳解
這篇文章主要為大家詳細(xì)介紹了Android中ToggleButton開關(guān)狀態(tài)按鈕控件的使用方法,具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下2017-08-08android ListView自動(dòng)滾動(dòng)方法
直接在Layout中寫即可,注意下面的stackFromBottom以及transcriptMode這兩個(gè)屬性2013-01-01Android中如何取消listview的點(diǎn)擊效果
這篇文章主要介紹了 Android中取消listview的點(diǎn)擊效果的實(shí)現(xiàn)方法,通過引用transparent之后會(huì)讓點(diǎn)擊效果透明化,一起通過本文學(xué)習(xí)吧2017-01-01