App>Activity>SecureDialog
这里介绍要给对话框,警告对话框
// Create a dialog.
AlertDialog dialog = new AlertDialog.Builder(this)
.setPositiveButton(android.R.string.ok, null)
.setMessage(R.string.secure_dialog_dialog_text)
.create();
// Make the dialog secure. This must be done at the time the dialog is
// created. It cannot be changed after the dialog has been shown.
dialog.getWindow().setFlags(WindowManager.LayoutParams.FLAG_SECURE,
WindowManager.LayoutParams.FLAG_SECURE);
// Show the dialog.
dialog.show();