How to create an overlay that blocks touch events to UI below it?

前端 未结 5 1446
伪装坚强ぢ
伪装坚强ぢ 2021-02-05 17:27

I used a layer of framelayout with a semi-translucent background to create an overlay. But this overlay doesn\'t block touch events to interact with the views below it. How sho

5条回答
  •  死守一世寂寞
    2021-02-05 18:07

    Improving the Blesson Jose answer, you need set the android:focusable="true" and android:clickable="true" if you are using View to block the touch.

提交回复
热议问题