欧美一区二区三区老妇人-欧美做爰猛烈大尺度电-99久久夜色精品国产亚洲a-亚洲福利视频一区二区

Android自定義對(duì)話框Dialog-創(chuàng)新互聯(lián)

本文簡(jiǎn)單介紹自定義對(duì)話框Dialog的使用,代碼和結(jié)構(gòu)都非常簡(jiǎn)單,目的是能夠快速使用自定義對(duì)話框,在本文中不具體講解對(duì)話框的高級(jí)使用。

創(chuàng)新互聯(lián)公司專注于企業(yè)全網(wǎng)整合營(yíng)銷推廣、網(wǎng)站重做改版、饒平網(wǎng)站定制設(shè)計(jì)、自適應(yīng)品牌網(wǎng)站建設(shè)、H5響應(yīng)式網(wǎng)站商城網(wǎng)站定制開發(fā)、集團(tuán)公司官網(wǎng)建設(shè)、成都外貿(mào)網(wǎng)站建設(shè)、高端網(wǎng)站制作、響應(yīng)式網(wǎng)頁(yè)設(shè)計(jì)等建站業(yè)務(wù),價(jià)格優(yōu)惠性價(jià)比高,為饒平等各大城市提供網(wǎng)站開發(fā)制作服務(wù)。

實(shí)現(xiàn)步驟

首先需要自己在我們的.xml文件中自己構(gòu)建布局
布局文件做好之后,我們可以在style文件下自己定義布局的樣式
前兩步都做好之后,我開始在寫java文件


具體實(shí)現(xiàn)過(guò)程

1.   xml文件

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:layout_width="300dp"
  android:layout_height="180dp"
  android:gravity="center"
  android:orientation="vertical">

  <LinearLayout
    android:layout_width="match_parent"
    android:layout_height="40dp"
    android:background="@android:color/holo_green_light">

    <TextView
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:gravity="center_vertical"
      android:text="IP設(shè)置"
      android:textColor="#fff"
      android:textSize="24sp" />
  </LinearLayout>

  <LinearLayout
    android:layout_width="match_parent"
    android:layout_height="0dp"
    android:layout_weight="1"
    android:background="#fff"
    android:gravity="center"
    android:orientation="horizontal"
    android:padding="5dp">

    <EditText
      android:id="@+id/et_ip1"
      
      android:layout_weight="1"
      android:inputType="phone"
      android:maxLength="3"
      android:textColor="@color/colorPrimary" />

    <EditText
      android:id="@+id/et_ip2"
      
      android:layout_weight="1"
      android:inputType="phone"
      android:maxLength="3"
      android:textColor="@color/colorPrimary" />

    <EditText
      android:id="@+id/et_ip3"
      
      android:layout_weight="1"
      android:inputType="phone"
      android:maxLength="3"
      android:textColor="@color/colorPrimary" />

    <EditText
      android:id="@+id/et_ip4"
      
      android:layout_weight="1"
      android:inputType="phone"
      android:maxLength="3"
      android:textColor="@color/colorPrimary" />
  </LinearLayout>

  <LinearLayout
    android:layout_width="match_parent"
    android:layout_height="45dp"
    android:orientation="horizontal">

    <Button
      android:id="@+id/btn_ipok"
      android:layout_width="0dp"
      android:layout_height="match_parent"
      android:layout_weight="1"
      android:background="@android:color/holo_green_light"
      android:text="確認(rèn)"
      android:textColor="#fff"
      android:textSize="30sp" />

    <View
      android:layout_width="1dp"
      android:layout_height="match_parent"
      android:background="#fff" />

    <Button
      android:id="@+id/btn_ipcancle"
      android:layout_width="0dp"
      android:layout_height="match_parent"
      android:layout_weight="1"
      android:background="@android:color/holo_green_light"
      android:text="取消"
      android:textColor="#fff"
      android:textSize="30sp" />
  </LinearLayout>
</LinearLayout>

新聞名稱:Android自定義對(duì)話框Dialog-創(chuàng)新互聯(lián)
當(dāng)前URL:http://www.chinadenli.net/article2/docooc.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供品牌網(wǎng)站設(shè)計(jì)Google全網(wǎng)營(yíng)銷推廣關(guān)鍵詞優(yōu)化域名注冊(cè)企業(yè)建站

廣告

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

營(yíng)銷型網(wǎng)站建設(shè)