android基础学习(6)-------AlertDialog.Builder提示对话框

来源:互联网 发布:.bat java 编辑:程序博客网 时间:2024/05/20 08:02

AlertDialog.Builder my_ADialog =new AlertDialog.Builder(this);

/*设置标题*/

my_ADialog.setTitle("Android 提示");

/*设置显示消息*/

my_ADialog.setMessage("AlertDialog.Builder提示对话框消息!!");

/*设置icon*/

my_ADialog.setIcon(R.drawable.right);

/*添加button*/

my_ADialog.setPositiveButton(R.string.about_dialog_ok, null);

/*显示*/

my_ADialog.show();