android中visible、invisible、gone
XML中写法:
android:visibility="visible"
android:visibility="invisible"
android:visibility="gone"
JAVA中写法:
view.setVisibility(View.VISIBLE);
view.setVisibility(View.INVISIBLE);
view.setVisibility(View.GONE);
区别:
1.VISIBLE:设置控件可见;
2.INVISIBLE:设置控件不可见,且保留控件所占有
原创
2020-06-04 20:51:46 ·
224 阅读 ·
0 评论