本篇文章简单介绍了怎样利用布局文件自定义Dialog
1.首先自定义一个布局文件dialog_layout.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="注销账号"
android:gravity="center"
android:paddingTop="15dp"
android:paddingBottom="15dp"
android:textColor="#ff646464"
android:textSize="16sp"
android:textStyle="bold"
/>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@drawable/pressed_bg"
/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
>
<Button
android:id="@+id/btn_logout"
android:layout_width="0dp"
android:layout_weight=