相對(duì)布局 RelativeLayout
android:gravity
屬性,用來(lái)設(shè)置里面的各組件的對(duì)其方式
android:ignoreGravity
屬性,用來(lái)指定那個(gè)組件不受gravity屬性的影響。
android:layout_aliginParentBottom
值為boolean類型,指定該組件是否與父布局底端對(duì)齊
android:layout_aliginParentTop
值為boolean類型,指定該組件是否與父布局頂端對(duì)齊
android:layout_aliginParentLeft
值為boolean類型,指定該組件是否與父布局左邊對(duì)齊
android:layout_aliginParentRight
值為boolean類型,指定該組件是否與父布局右邊對(duì)齊
android:layout_centerHorizontal
值為boolean類型,指定該組件是否位于父布局水平居中位置。
android:layout_cneterVertical
值為boolean ,指定該組件是否位于父布局垂直居中位置。
android:layout_centerInParent
值為boolean,指定該組件是否位于父布局垂直和水平同時(shí)居中位置。
android:layout_above
屬性,屬性值為其他UI組件的id,指定該組件位于哪個(gè)組件上方。
android:layout_below
屬性,屬性值為其他UI組件的id,指定該組件位于哪個(gè)組件下方。
android:layout_toLeftOf
屬性,屬性值為其他UI組件的id,指定該組件位于哪個(gè)組件左側(cè)。
android:layout_toRightOf
屬性,屬性值為其他UI組件的id,指定該組件位于哪個(gè)組件右側(cè)。
android:layout_aliginBottom
屬性,屬性值為其他UI組件的id,指定該組件與哪個(gè)組件下邊界對(duì)齊。
android:layout_aliginLeft
屬性,屬性值為其他UI組件的id,指定該組件與哪個(gè)組件左邊界對(duì)齊。
android:layout_aliginRight
屬性,屬性值為其他UI組件的id,指定該組件與哪個(gè)組件右邊界對(duì)齊。
android:layout_aliginTop
屬性,屬性值為其他UI組件的id,指定該組件與哪個(gè)組件上邊界對(duì)齊。
margin 和padding 屬性值均為dp數(shù)值,