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程序設(shè)計有所幫助。
相關(guān)文章
Android Location服務(wù)之LocationManager案例詳解
這篇文章主要介紹了Android Location服務(wù)之LocationManager案例詳解,本篇文章通過簡要的案例,講解了該項技術(shù)的了解與使用,以下就是詳細內(nèi)容,需要的朋友可以參考下2021-08-08Android通過命令連接wifi的方法(解決usb不能用問題)
這篇文章主要介紹了Android通過命令連接wifi的方法(解決usb不能用的情況),本文通過實例代碼給大家介紹的非常詳細,具有一定的參考借鑒價值,需要的朋友可以參考下2020-02-02Android編程實現(xiàn)下載時主界面與詳細界面一致更新的方法
這篇文章主要介紹了Android編程實現(xiàn)下載時主界面與詳細界面一致更新的方法,涉及Android事件監(jiān)聽及界面動態(tài)更新相關(guān)操作技巧,需要的朋友可以參考下2017-11-11Android中使用Service實現(xiàn)后臺發(fā)送郵件功能實例
這篇文章主要介紹了Android中使用Service實現(xiàn)后臺發(fā)送郵件功能的方法,結(jié)合實例形式分析了Service實現(xiàn)郵件的發(fā)送、接收及權(quán)限控制相關(guān)技巧,需要的朋友可以參考下2016-01-01Android中ToggleButton開關(guān)狀態(tài)按鈕控件使用方法詳解
這篇文章主要為大家詳細介紹了Android中ToggleButton開關(guān)狀態(tài)按鈕控件的使用方法,具有一定的參考價值,感興趣的小伙伴們可以參考一下2017-08-08