AlertDialog

public void onClick(View v) {

    new AlertDialog.Builder(MainActivity.this)

            .setTitle("This is Dialog~")//title

            .setMessage("Are you sure?")//text

            .setCancelable(false)//'false' is you can't cancel the Dialog;

            .setPositiveButton("Ojbk", new DialogInterface.OnClickListener() {

                @Override

                public void onClick(DialogInterface dialog, int which) {

                   

                }

            })

            .setNegativeButton("No",null)

            .setNeutralButton("don't care",null)//一般按钮,点击关闭使用

            .show();

}

相关文章:

  • 2021-11-16
  • 2021-06-26
  • 2021-11-12
  • 2021-07-13
  • 2022-12-23
  • 2022-12-23
  • 2021-06-10
猜你喜欢
  • 2021-12-09
  • 2021-09-20
  • 2022-01-07
相关资源
相似解决方案