How to disable user interaction while ProgressBar is visible in android?

后端 未结 7 2063
我在风中等你
我在风中等你 2020-12-12 13:08

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

7条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-12 13:39

    I have fixed this issue by adding root layout to the ProgressBar.

    
        
    
    

    Made the root layout clickable

    android:clickable="true"
    

    NOTE: In my main view, I had RelativeLayout as root and have added above-mentioned code inside the root layout at the last position (last child).

    Hope this helps!!

提交回复
热议问题