1、LinearLayoutandroid
线性布局,即一行展开或者一列展开,也能够嵌套,须要注意的属性以下:布局
android:orentation //对齐方式it
2、FrameLayoutio
帧布局,即一层层叠起来,最早放的在最底下,须要注意的属性以下:sed
无layout
3、RelativeLayoutmargin
相对布局,即经过对某一参照控件,进行布局,须要注意的属性以下:di
android:layout_toLeftof//在某参照物的左边vi
android:layout_toRightof//在某参照物的右边co
android:layout_toBelow//在某参照物的下面
android:layout_toAbove//在某参照物的上面
android:layout_alignLeft//与某参照物的左边对齐
.
.
.
4、TableLayout
表格布局,即像表格那样布局,须要注意的属性以下
android:shrinkableColumns //收缩的列数,以数字0,1,2标记
android:strechableColumns//拉伸的列数,以数字0,1,2标记
android:collapsedColumns//折叠的列数,以数字0,1,2标记
须要共同注意的属性:
android:gravity //子控件的布局方式
android:layout_gravity //当前空前相对父控件的布局方式
android:layout_marginTop/Left/Right/Bottom //页边距,当前控件相对于上层控件的边距
android:marginTop/Left/Right/Bottom //子控件至关于当前控件的边距
android:paddingLeft/Right/Top/Bottom //控件内容相对于当前控件的距离