自定义对话框Dialog、Android样式和主题
自定义对话框
首先需要为弹出的Dialog编写一个xml文件,确定对话框的样式
如一下为my_dialog.xml的代码:
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent" android:layout_height="match_parent">
<LinearLayout
android:layout_gravity="center"
android:background="#ffffff"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<TextView
android:id="@+id/tv_title"
android:background="#0080FF"
android:gravity="center"
androi