Layout Attributes(最常用)
Layout 屬性:
id:每一個項目都有一個獨一無二的號碼。
paddingLeft:項目裡面左邊間距。
paddingRight:項目裡面右邊間距。
paddingTop :項目裡面上方間距。
paddingButton:項目裡面下方間距。
layout_weight:剩下的空間分配。
weight愈高代表愈重要。
paddingLeft:項目裡面左邊間距。
paddingRight:項目裡面右邊間距。
paddingTop :項目裡面上方間距。
paddingButton:項目裡面下方間距。
layout_weight:剩下的空間分配。
weight愈高代表愈重要。
layout_width:佈局的寬度。
layout_height:佈局的高度。
layout_width和 layout_height 的屬性
wrap_content:項目寬或高都占滿畫面。
match_parent:項目寬或高僅把控制項包滿,沒有占滿畫面。
layout_height:佈局的高度。
layout_width和 layout_height 的屬性
wrap_content:項目寬或高都占滿畫面。
match_parent:項目寬或高僅把控制項包滿,沒有占滿畫面。
layout_marginTop:離項目上邊緣的間隔。
layout_marginBottom:離項目下邊緣的間隔。
layout_marginLeft:離項目左邊緣的間隔。
layout_marginRight:離項目右邊緣的間隔。
layout_gravity :項目(例如:button)裡面文字或圖片的相對位置。
layout_x:佈局的x值。
layout_y:佈局的y值。
2013/08/android.html
layout_marginBottom:離項目下邊緣的間隔。
layout_marginLeft:離項目左邊緣的間隔。
layout_marginRight:離項目右邊緣的間隔。
layout_gravity :項目(例如:button)裡面文字或圖片的相對位置。
layout_x:佈局的x值。
layout_y:佈局的y值。
沒有留言:
張貼留言