How to change visibility of layout programmatically

后端 未结 5 1210
温柔的废话
温柔的废话 2020-12-03 06:13

There is the way to change visibility of View, but how can I change programmatically visibility of layout defined in XML? How to get layout object?



        
5条回答
  •  旧巷少年郎
    2020-12-03 07:12

    You can change layout visibility just in the same way as for regular view. Use setVisibility(View.GONE) etc. All layouts are just Views, they have View as their parent.

提交回复
热议问题