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

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)站建設
亚洲精品熟女一区二区三区| 亚洲少妇精品视频在线| 免费在线观看欧美色妇| 国产大片在线观看一区二区| 久久综合亚洲鲁鲁五月天| 久久偷拍女生厕所尿尿| 国内极品尤物视频在线| 国产真人作爱视频免费| 国产熟女一区二区三区正在| 手机蜜臀av在线播放| 日本一区二区三区高清在线| 日本午夜诱惑在线观看| 欧美日韩国产一区在线| 黄色日韩大片在线观看| 蜜桃视频中文字幕二区三区| 久久国产精品亚洲看片| 久草福利在线观看免费| 白天躁晚上躁天天躁在线| 九色国产一区二区三区| 中文字幕人妻久久精品一区| 欧美亚洲另类色自拍偷拍| 国产男女乱淫一区二区三区| 久久夜色一区二区三区| 国产成人亚洲精品专区高清| 日本中文一区在线观看| 日本加勒比系列在线播放| 亚洲天堂日韩欧美在线一区| 99久久免费热在线观看| 日韩精品欧美成人高清一区二区| 亚洲精品成人综合色在线| 亚洲伦理第一页中文字幕| 日韩蜜桃av一二三四区| 在线观看精品日本一区二| 久久久久久成人亚洲| 久草视频在线免费资源站| 日韩中文字幕亚洲精品一| 亚洲天堂av日韩在线| 亚洲欧美日韩专区一区| 久久色综合色悠悠色综合色| 青青草原免费在线观看| 91人妻精品丰满少妇区|