首先看一下对话框样式效果如下:截图不是很高清,凑合着看吧
下面是样式文件代码:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="296.0dip"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical|center"
android:background="@drawable/ic_dlg_background" >
<RelativeLayout
android:id="@+id/dlg_rlyt_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="12.0dip" >
<TextView
android:id="@+id/id_dlg_common_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:text="我是标题"
android:textColor="@color/dlg_title"
android:textSize="18.0dip" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/dlg_rlyt_body"
android:layout_width="match_parent"