[Java] Android带title、message、图标和按钮的对话框 →→→→→进入此内容的聊天室

来自 , 2019-03-14, 写在 Java, 查看 140 次.
URL http://www.code666.cn/view/9a32ff36
  1. AlertDialog alertDialog = new AlertDialog.Builder(this).create();
  2. alertDialog.setTitle("Title");
  3. alertDialog.setMessage("Message");
  4. alertDialog.setButton("OK", new DialogInterface.OnClickListener() {
  5.    public void onClick(DialogInterface dialog, int which) {
  6.       // TODO Add your code for the button here.
  7.    }
  8. });
  9. // Set the Icon for the Dialog
  10. alertDialog.setIcon(R.drawable.icon);
  11. alertDialog.show();
  12. //java/5327

回复 "Android带title、message、图标和按钮的对话框"

这儿你可以回复上面这条便签

captcha