Android: why setVisibility(View.GONE); or setVisibility(View.INVISIBLE); do not work

前端 未结 11 2147
[愿得一人]
[愿得一人] 2020-12-02 12:51

I want my DatePicker and the button to be invisible in the begining. And when I press my magic button I want to setVisibility(View.Visible);

The problem

11条回答
  •  误落风尘
    2020-12-02 13:39

    You can think it as a CSS style visibility & display.

    This is View.VISIBLE : Content is displayed normally.
    This is View.INVISIBLE : Content is not displayed, but div still takes up place, but empty.
    This is View.GONE : Container div is not shown, you can say the content is not displayed.

提交回复
热议问题