使用的是AlertDialog
自定义弹窗呢,就是一个界面放在了AlertDialog容器弹框上。
第一步:写好你的界面 (在layout下创建system_admin_psw_alert_dialog.xml)
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#fff"
android:padding="10dp"
>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_marginBottom="10dp"
>
<ImageView
android:id="@+id/system_admin_psw_alert_img"
android:layout_width="40dp"
android:layout_height="40dp"
android:background="@drawable/warn"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="40dp"
android:text="@string/warning"
android:textColor="#f00"
android:textSize="25sp"
android:layout_marginLeft=