I have an activity that has buttons and images that can appear and disappear depending on user interactions.
What I am finding is that objects at the back, which hav
Making any View
invisible don't prevent us to trigger their listeners. It's just you can not see it every other thing would be same as if it was visible.
If you don't want to use it at all change it to View.GONE
Difference in View.INVISIBLE
and View.GONE
: Invisible objects keep on utilizing the space assigned to it while object set as View.GONE
would leave the space of space as if its not on screen.
Use
object.setVisibility(View.GONE);
rather than
object.setVisibility(View.INVISIBLE);