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
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.
I would have post this as a comment, but unfortunately I was not able to post a comment. As it could be a possible solution for you, i post it that way:
As you write "onClick" I assume you're using the onClick
attribute in your XML layout. Try to set an OnClickListener
with setOnClickListener
instead of the onClick
attribute. Maybe this helps...
If you set setVisibility(View.GONE)
after some animation (fade out, for example), then try clearing the animation with clearAnimation()
. This is what helped me.