I have a custom dialog that rejects when clicked outside of the dialog box, which I don't want. dialog.setCanceledOnTouchOutside(false); does not fix the problem. What am I doing wrong?
dialog = new Dialog(context); dialog.requestWindowFeature(Window.FEATURE_NO_TITLE); dialog.setCanceledOnTouchOutside(false); dialog.setContentView(R.layout.twitter_dialog); // set up edit text and other widgets dialog.getWindow().setLayout(450, 280); dialog.show();
EDIT: I call this dialog from another dialog that has setCanceledOnTouchOutside (true). Before invoking this dialog, the previous dialog is rejected.
source share