3

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?

Mahadevan Sreenivasan
  • 1,144
  • 1
  • 9
  • 26

1 Answers1

4

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();
Chris
  • 8,527
  • 10
  • 34
  • 51
guinetik
  • 270
  • 3
  • 4