p;
Toast.makeText(MainActivity.this, "不需要更新", Toast.LENGTH_SHORT).show();
}
});
builder.setNeutralButton("下一次", new OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
Toast.makeText(MainActivity.this, "下一次吧", Toast.LENGTH_SHORT).show();
}
});
Dialog dialog = builder.create();
dialog.show();
}
2 自定义对话框-- 用户登录
布局文件:
user_name_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:padding="10dip"
- android:orientation="vertical" >
-
- <TextView
- android:id="@+id/tv_title"
- android:layout_width="match_parent" &
|