I would like to change the default setting for the Alert dialog for Landscape by default. I do not want to handle the orientation of the dialog when changing the orientation of the device.
AlertDialog.Builder builder = new AlertDialog.Builder(MenuActivity.this); builder.setMessage("Are you sure you want to exit?") .setCancelable(false) .setTitle("EXIT") .setPositiveButton("Yes", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { MenuActivity.this.finish(); } }) .setNegativeButton("No", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { dialog.cancel(); } }); AlertDialog alert = builder.create(); alert.setIcon(R.drawable.ic_launcher); alert.show();
I cannot find what specifically handles the default orientation of this dialog? Any help would be greatly appreciated. Thanks in advance.
source share