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

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)站建設
91欧美日韩国产在线观看| 凹凸69堂国产成人精品| 欧美一区二区专区在线| 日韩欧美一区二区狠狠插| 黄片视频免费在线观看播放| 成人爱爱免费观看视频| 亚洲精品国产中文字幕| 日本一区二区不卡视频在线播放| 久久亚洲中文字幕乱码| 日产极品一区二区三区| 中文字幕欧美日韩人妻| 99久久精品人妻少妇一| 日韩成人高清免费在线| av日韩在线一区二区三区| 日本欧美三级高潮受不了| 亚洲av成人在线资源| 成年人三级黄色片视频| 亚洲最大成人av在线| 精品欧美一区二区在线| 国产精品九九久久精品三级| 2018在线不卡爱视频| 人妻熟女一区二区视频| 亚洲国产中日韩精品综合| 欧美亚洲一区二区三区91| 日日干天天日夜夜操| 国产精品亚洲二区三区| 精品国产一区二区三区av在线| 欧美在线免费黄片视频| 偷拍丝袜美腿在线观看| 日本一区二区三区免费精品| 亚洲精品成人一区二区| 欧美国产日韩在线一区二区三区| 国产一边打电话一边操| 最新日本免费久久精品| 成人在线午夜你懂的视频| 激情内射日本一区二区三区| 欧美视频在线免费观看黄片| 欧美激情一区二区三区蜜桃| 日韩精品中文字幕免费人妻| 日韩成人中文字幕电影| av福利一区二区三区|