安卓Visibility属性

时间:2021-11-21 04:10:03

可见(visible)

XML文件:android:visibility="visible"

Java代码:view.setVisibility(View.VISIBLE);

不可见(invisible)

XML文件:android:visibility="invisible"

Java代码:view.setVisibility(View.INVISIBLE);

隐藏(GONE)

XML文件:android:visibility="gone"

Java代码:view.setVisibility(View.GONE);