欧美一级特黄大片做受成人-亚洲成人一区二区电影-激情熟女一区二区三区-日韩专区欧美专区国产专区

Android用PopupWindow實現(xiàn)自定義Dailog-創(chuàng)新互聯(lián)

Android的PopupWindow是個很有用的widget,利用它可以實現(xiàn)懸浮窗體的效果,比如實現(xiàn)一個懸浮的菜單,最常見的應用就是在視頻播放界面里,做一個工具欄,用來控制播放進度。本文利用PopupWindow來實現(xiàn)一個通用的Dailog,類似Android系統(tǒng)的AlertDailog,從中學習和掌握有關PopupWindow和Dailog的使用和實現(xiàn)細節(jié)。

成都創(chuàng)新互聯(lián)公司主營疏勒網(wǎng)站建設的網(wǎng)絡公司,主營網(wǎng)站建設方案,app軟件開發(fā),疏勒h5微信小程序開發(fā)搭建,疏勒網(wǎng)站營銷推廣歡迎疏勒等地區(qū)企業(yè)咨詢

界面效果如圖所示,點擊 Click 按鈕后,彈出對話框提示。


(1).  CustomDailog的布局

首先定義 CustDailog的布局文件,由系統(tǒng)的AlertDailog可以知道,一個對話框包含了三個要素,一個是Title,即標題,一個是Message,即主體內(nèi)容,還有一個是Button,即確定和取消的按鈕,用來與用戶交互。因此,布局設計如下:

<?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"
  android:orientation="vertical"
  android:background="@drawable/shape_bg"
  android:layout_margin="10dp">
                                                                                                                                                         
  <TextView   
    android:id="@+id/CustomDlgTitle"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:textStyle="bold"
    android:textSize="20sp"
    android:layout_margin="10dp"
    android:gravity="center"/>
                                                                                                                                                           
  <View
    android:layout_width="match_parent"
    android:layout_height="1dp"
    android:background="@android:color/darker_gray"/>
                                                                                                                                                           
  <LinearLayout
    android:id="@+id/CustomDlgContentView"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:orientation="vertical"
    android:layout_margin="5dp" />
                                                                                                                                                         
  <TextView
    android:id="@+id/CustomDlgContentText"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:textSize="15sp"
    android:layout_margin="5dp"
    android:paddingLeft="5sp"/>
                                                                                                                                                       
  <LinearLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:orientation="horizontal"
    android:layout_margin="5dp" >
                                                                                                                                                         
    <Button
      android:id="@+id/CustomDlgButtonOK"
      android:layout_width="0dp"
      android:layout_weight="0.5"
      android:layout_height="wrap_content"
      android:visibility="gone"/>
                                                                                                                                                             
    <Button
      android:id="@+id/CustomDlgButtonCancel"
      android:layout_width="0dp"
      android:layout_weight="0.5"
      android:layout_height="wrap_content"     
      android:visibility="gone"/>
                                                                                                                                                      
  </LinearLayout>
                                                                                                                                                       
</LinearLayout>

本文名稱:Android用PopupWindow實現(xiàn)自定義Dailog-創(chuàng)新互聯(lián)
當前URL:http://aaarwkj.com/article18/ppjdp.html

成都網(wǎng)站建設公司_創(chuàng)新互聯(lián),為您提供建站公司、外貿(mào)網(wǎng)站建設定制開發(fā)、網(wǎng)站排名全網(wǎng)營銷推廣、品牌網(wǎng)站建設

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)

h5響應式網(wǎng)站建設
国产精品久久99一区| 国产精品天干天综合网| 91桃色午夜福利视频| 欧美日本国产高清不卡| 麻豆精品国产免费av影片| 亚洲码欧洲码一二三区| 国产精品一区二区免费式| 人妻上司无奈中文字幕| 国产一级二级三级亚洲| 亚洲午夜一区二区三区精品| 国产深夜福利在线观看| av天堂五月在线观看| 国产一区二区三区区别| 久久精品国产亚洲av高清不卡| 亚洲日本在线观看一区 | 一区二区蜜桃在线观看| 亚洲欧洲日产国码一区| 亚洲欧美日韩校园春色| 亚洲熟妇av乱码在线观看| 国产亚洲精品精品国产亚洲| 色伊人久久综合中文字幕| 久久综合色爱综合欧美| 国产欧美日韩在线高清| 欧美生活一区二区三区| 精品国产乱码久久蜜桃| 韩国久久久久三级成人| 久久综合婷婷亚洲色图| 亚洲一区二区三区不卡伦理| 巴西老熟女大奶子多毛逼| 国产特级黄色片免费看| 欧美黄片高清免费播放| 亚洲精品欧美综合二区| 国产婷婷成人久久av免费高清 | 国产日韩精品专区一区| 国产偷自一区二区三区| 极品性感尤物少妇粉嫩逼| 尤物视频在线观看一下| 日韩人成理论午夜福利| 国产老妇伦国产熟女高清| 蜜桃av在线播放视频| 偷怕自拍在线免费观看|