You can do that in Java coding very easily. If you have an Activity (even if it looks like a Dialog), then you should doide
this.setFinishOnTouchOutside(false);
if you have used Dialog class, you should callthis
dialog.setFinishOnTouchOutside(false)
if you want to prevent closing it open when the background activity is clicked.spa