Android: Invisible objects still clickable

后端 未结 6 635
小蘑菇
小蘑菇 2021-01-17 11:28

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

6条回答
  •  时光取名叫无心
    2021-01-17 11:46

    Use object.setVisibility(View.GONE); instead object.setVisibility(View.INVISIBLE);

    View.GONE Means This view is invisible, and it doesn't take any space for layout purposes.

    View.GONE This view is invisible, and it doesn't take any space for layout purposes.

    View.INVISIBLE This view is invisible, but it still takes up space for layout purposes.

    I hope it will helps you .

提交回复
热议问题