答案 0 :(得分:13)
答案 1 :(得分:4)
答案 2 :(得分:1)
AlertDialog.Builder ab = new AlertDialog.Builder(this);
ab.setMessage("Test")
.show;
(或) 如果你想要(是的,没有)按钮意味着使用这个
AlertDialog.Builder ab = new AlertDialog.Builder(this);
ab.setMessage("Are you sure you want to exit?")
.setPositiveButton("Yes", dialogClickListener)
.setNegativeButton("No", dialogClickListener)
.show();