1.原生的
private void showAlerDialog() {
AlertDialog dialog = new AlertDialog.Builder(this)
.setTitle("AlerDialog")
.setMessage("这是一个AlertDialog")
.setPositiveButton("确定",null)
.setNegativeButton("取消",null)
.create();
dialog.show();
}
2.修改标题头和内容颜色
private void showAlerDialog() {
AlertDialog dialog = new AlertDialog.Builder(this)