layout_dialog.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="match_parent"
android:background="@drawable/dialog_bg">
<TextView
android:layout_width="match_parent"
android:gravity="center_horizontal"
android:layout_margin="10dp"
android:layout_height="wrap_content"
android:text="Dialog自定义测试" />
</LinearLayout>