我已经通过 Android TalkBack 检查了所有默认警报对话框。默认的 Android 对讲行为是它读取对话框中的所有内容(不间断)。有什么方法可以根据我的需要定制它。例如 :
AlertDialog alertDialog = new AlertDialog.Builder(AlertDialogActivity.this).create();
alertDialog.setTitle("Alert Dialog");
alertDialog.setMessage("This is my alert dialog");
alertDialog.setButton("OK", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
Toast.makeText(getApplicationContext(), "You clicked on OK", Toast.LENGTH_SHORT).show();
}
});
alertDialog.show();
当对话框出现时,它会自动读取“警报对话。这是我的警报对话。好的。” 但我想控制它,就像它应该只读取“警报对话”或“这是我的警报对话”等。
在点击“确定”时,它只显示“确定”,而不是“确定按钮”。