Android常用布局
FrameLayout(帧布局)
显示特点:所有的子控件默认显示在FrameLayout的左上角,会重叠在一起显示.
常用属性:
layout_gravity(设置给子控件,调整控件在容器内的重心)
常用值:
left(左) right(右)
top(上) bottom(下)
center(中心)center_vertical(竖向中心)
center_horizontal(横向中心)
LinearLayout(线性布局)
显示特点:所有子控件按照横向或者竖向依次排列,
android:orientation="vertical"(竖向),
android:orientation="horizontal"(横向)。
常用属性:
① gravity(控件本身内的重心位置)
常用值:
left(左)right(右)
top(上)bottom(下)center(中心)
enter_vertical(竖向中心)center_horizontal(