几种常用的布局
1、线性布局(LinearLayout)
android:gravity设置组件在该布局中的位置
bottom:设置组件在布局的底部
center_vertical:垂直居中
bottom|center_horizontal:在布局的底部,水平居中
2、表格布局(TableLayout)
设置第二列可拉伸,3列可压缩
android:stretchColumns="1"
android:shrinkColumns="2"
设置第二列隐藏
android:collapseColumns="1"
3、帧布局(FrameLayout)
4、相对布局
5、绝对布局
作业:
1、 掌握自定义组件
2、掌握三种布局
1、线性布局(LinearLayout)
android:gravity设置组件在该布局中的位置
bottom:设置组件在布局的底部
center_vertical:垂直居中
bottom|center_horizontal:在布局的底部,水平居中
2、表格布局(TableLayout)
设置第二列可拉伸,3列可压缩
android:stretchColumns="1"
android:shrinkColumns="2"
设置第二列隐藏
android:collapseColumns="1"
3、帧布局(FrameLayout)
4、相对布局
5、绝对布局
作业:
1、 掌握自定义组件
2、掌握三种布局
3、写一个登录界面