How to disable all click events of a layout?

后端 未结 7 1768
不知归路
不知归路 2020-12-16 10:51

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

7条回答
  •  醉话见心
    2020-12-16 11:18

    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.

提交回复
热议问题