Search code examples
androidandroid-layout

How to disable all click events of a layout?


I have a layout that contains many views. Is there an easy way to disable all its views click events?


Solution

  • I would create a ViewGroup with all the views that you want to enable/disable at the same time and call setClickable(true/false) to enable/disable clicking.