我有一个警报对话框,当用户单击设备上的后退按钮时会调用该对话框,但此警报太短,用户无法读取其中的任何内容或对其执行任何操作..
AlertDialog alertDialog = new AlertDialog.Builder(birthDate.this).create();
// Setting Dialog Title
alertDialog.setTitle("Alert Dialog");
// Setting Dialog Message
alertDialog.setMessage("Welcome to AndroidHive.info");
// Setting OK Button
alertDialog.setButton("OK", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
// Write your code here to execute after dialog closed
Toast.makeText(getApplicationContext(), "You clicked on OK", Toast.LENGTH_LONG).show();
}
我想让这个警报对话框的时间更长