android学习记录(四)管理里中基本组键

1.线性布局管理器http://schemas.android.com/apk/res/android>

LinearLayout >

  Androidorientation 用于设置布局管理器内组件的排列方式(ertical(垂直)、horizontal(水平))

  Android:gravity 用于设置管理器内组件的对齐方式(top、bottom、left、right等)

  Android:layout_width 用于设置管理器内组件的基本宽度(fill_parent、match_parent、wrap_conent)

  Android:layout_height 用于设置布局管理器内组件的基本高度(fill_parent、match_parent、wrap_conent)

  Android:id 为当前组件设置一个id属性

  Android:background 用于为该组件设置背景

2. 绝对布局管理器

android="http://schemas.android.com/apk/res/android" >

  android:layout_x="20px" 使用layout_x精确控制坐标

android:layout_y="10px"使用layout_y精确控制坐标

3.框架布局管理器"http://schemas.android.com/apk/res/android”>

 Android:foreground 设置该框架布局容器的前景图像

 Android:foregroundGravity 定义绘制前景图像的gravity属性,也就是前景图像显示的位置

4.相对布局管理器"http://schemas.android.com/apk/res/android">

按照组件之间的相对位置来进行布局的,如某个组件在另一个组件的左边、上边等、

android:gravity 用于设置布局管理器中各个组件的对齐方式

android:ignoreGravity 用于制定哪个组件不受gravity属性的影响

android:layout_above 用于指定该组件位于那个组件的上方

android:layout_alibnBottom用于指定该组件与哪个组件的下边界对齐

android:layout_alibnLeft 用于指定该组件与哪个组件的左边界对齐

android:layout_alibnParenBottom 用于指定该组件是否与布局管理器底端对齐

android:layout_alibnParenTop 用于指定该组件是否与布局管理器底顶端对齐

android:layout_alibnParenRight 用于指定该组件是否与布局管理器右端对齐

android:layout_alibnParenLeft 用于指定该组件是否与布局管理器左端对齐

android:layout_below 用于指定该组件位于那个组件的下方

android:layout_centerHorizontal 用于指定该组件是否位于布局管理器水平居中的位置

android:layout_centerInParent 用于指定该组件是否位于布局管理器中央的位置

android:layout_centerVertical 用于指定该组件是否位于布局管理器垂直居中的位置

android:layout_yoLeftOf 用于指定该组件位于哪个组件的左侧

android:layout_yoRightOf 用于指定该组件位于哪个组件的右侧

5表格布局管理器"http://schemas.android.com/apk/res/android">

  android:collapseColumns  设置需要被隐藏的列的序列号(序号从0开始),多个序号之间用分号隔开

  android:shrinkColumns  设置允许被收缩的列的序列号(序号从0开始),多个序号之间用分号隔开

  android:stretchColumns  设置允许被拉伸的列的序列号(序号从0开始),多个序号之间用分号隔开

  (表格布局管理器就是在线性布局管理器上 加了改动。本来线性布局管理器只是在一行一个组件,而表格布局管理器可以是多个。)

转载于:https://www.cnblogs.com/CrazyKing/p/5401792.html

你可能感兴趣的:(移动开发)