Visibility属性にはinvisibleとgoneの違いがあります.
http://developer.android.com/reference/android/view/View.html#attr_android:visibility
以下はAndroid Developersで、それらの違いを紹介します.
android:visibility
Controls the initial visibility of the view.
Must be one of the follwing constant values.
コンサート
Value
Description
Visible on screenthe default value.
Not displayed、but taken into account during layout(space is left for it)
Copletely hidden、as if the view had not been added.
This corespins to the global atribute resource smbol
Related Methods set Visibility(int) goneは完全に隠しています.InVisibleは見えませんが、コントロールの空間占有は依然として存在します.
以下はAndroid Developersで、それらの違いを紹介します.
android:visibility
Controls the initial visibility of the view.
Must be one of the follwing constant values.
コンサート
Value
Description
visible
0Visible on screenthe default value.
invisible
1Not displayed、but taken into account during layout(space is left for it)
gone
2Copletely hidden、as if the view had not been added.
This corespins to the global atribute resource smbol
visibility
.Related Methods
上のコードで右側のような効果が見られます.