I want to disable the user interaction in an activity so that the user cannot touch the view/ subviews inside the content view of the activity. Is there any way to achieve this?
You can add a blank dialog on top of your activity like this:
overlayDialog = new Dialog(context, android.R.style.Theme_Panel);
overlayDialog.show();
and when you don't need it any more, call
overlayDialog.dismiss();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With