這篇文章主要為大家展示了Android自定義textview如何實現(xiàn)豎直滾動跑馬燈效果,內(nèi)容簡而易懂,希望大家可以學習一下,學習完之后肯定會有收獲的,下面讓小編帶大家一起來看看吧。
xml布局
<?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/activity_main" android:layout_width="match_parent" android:layout_height="match_parent" tools:context="myandroidstituds.test3.MainActivity"> <LinearLayout android:layout_centerInParent="true" android:layout_width="180dp" android:layout_height="50dp"> <TextView android:padding="10dp" android:layout_width="match_parent" android:layout_height="match_parent" android:background="#55000000" /> </LinearLayout> <myandroidstituds.test3.MarqueeLayout android:id="@+id/mar" android:layout_centerInParent="true" android:layout_width="180dp" android:layout_height="50dp"> <TextView android:id="@+id/tv1" android:textSize="20sp" android:gravity="center" android:background="@android:color/transparent" android:layout_width="match_parent" android:layout_height="match_parent" android:textColor="#000000" android:visibility="gone" android:text="兩個黃鸝鳴翠柳" /> <TextView android:id="@+id/tv2" android:textSize="20sp" android:background="@android:color/transparent" android:gravity="center" android:layout_width="match_parent" android:layout_height="match_parent" android:textColor="#000000" android:visibility="gone" android:text="一行白鷺上青天" /> </myandroidstituds.test3.MarqueeLayout> </RelativeLayout>
分享題目:Android自定義textview如何實現(xiàn)豎直滾動跑馬燈效果-創(chuàng)新互聯(lián)
本文鏈接:http://www.rwnh.cn/article8/hdeop.html
成都網(wǎng)站建設公司_創(chuàng)新互聯(lián),為您提供定制開發(fā)、網(wǎng)站內(nèi)鏈、品牌網(wǎng)站設計、靜態(tài)網(wǎng)站、網(wǎng)站設計公司、網(wǎng)站收錄
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)
猜你還喜歡下面的內(nèi)容