How to disable user interaction while ProgressBar is visible in android?
<p>I am using a custom ProgressBar. Now while a task is going on, I am showing the progress bar, but user can still interact with the views and controls. 
How do I disable the user interaction on whole view just like a ProgressDialog does , when it is visible.</p>

<p>Do I need to use a transparent view on top of main view and show the progress bar on that view and hide that view once a task is completed. </p>

<p>Or just get the id of my parentView and set it disabled ? But then I won't be able to dim the background, just like what happens when a dialog appears on the view/Activity/Fragment. Right? </p>

<p>I just want to know the way to disallow the user from any interaction while the progressbar is visible.</p>

<p>Thanks</p>