RelativeLayout android:visibility="gone/visible/invisible"此属性意思是此视图是否显示例如RelativeLayout中android:visibility="gone"其有三个属性: visible显示; invisible显示黑背景条; gone不显示在类中,可以设置其显示与否,setVisibility(View.GONE);不显示,setVisibility(View.VISIBLE);显示.