本文實(shí)例為大家分享了android桌面懸浮窗,實(shí)現(xiàn)錄屏?xí)r間控制顯示效果的具體代碼,供大家參考,具體內(nèi)容如下
懸浮窗效果如上圖所示:
很簡單的一個(gè)布局直接上代碼
懸浮窗布局如下record_screen_time_float.xml
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" android:layout_height="wrap_content"> <LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/corners_bg" android:paddingBottom="3dp" android:paddingTop="3dp" android:paddingLeft="15dp" android:paddingRight="8dp" android:layout_gravity="center" android:gravity="center" android:orientation="horizontal"> <TextView android:id="@+id/record_time" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="00:00" android:textColor="#ffffff" android:textSize="10dp" /> <View android:layout_width="2dp" android:layout_height="match_parent" android:layout_marginLeft="5dp" android:layout_marginRight="5dp" android:textColor="#ffffff" /> <LinearLayout android:id="@+id/stop_record" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" android:gravity="center" android:orientation="horizontal"> <ImageView android:id="@+id/record_hint_button" android:layout_width="10dp" android:layout_height="10dp" android:layout_marginRight="5dp" android:background="#FF4040" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="結(jié)束" android:textColor="#ffffff" android:textSize="10dp" /> </LinearLayout> </LinearLayout> </LinearLayout>
本文標(biāo)題:android桌面懸浮窗顯示錄屏?xí)r間控制效果-創(chuàng)新互聯(lián)
瀏覽路徑:http://aaarwkj.com/article20/dspsjo.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供虛擬主機(jī)、用戶體驗(yàn)、品牌網(wǎng)站制作、做網(wǎng)站、企業(yè)網(wǎng)站制作、動(dòng)態(tài)網(wǎng)站
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)
猜你還喜歡下面的內(nèi)容