android View with View.GONE still receives onTouch and onClick

后端 未结 9 2161
温柔的废话
温柔的废话 2020-12-13 03:40

This is confusing me:

As far as I have read, a view with setVisibility(View.GONE); should not receive any more touch- or click events. My layout has two parts, which

9条回答
  •  难免孤独
    2020-12-13 04:03

    For those that did the answers above and still didn't solve their problems, I recommend removing the view from the parent view. If you need display the view again, just make a copy and add it to the parent view.

    This might seem overkill but I was hiding / showing whole view groups in your case it might be a button, textview or image, this solution will still work.

提交回复
热议问题