Android菜鸟日记7

Android菜鸟日记7

1.LinearLayout的使用方法
线性布局

Ps:   android:orientation 布局方式 horizontal 水平    vertical垂直 是linearLayout的属性



Android:id  为控件指定序列号
Android:text 指定控件显示的文字
Android:grivity 指定控件的基本位置 居中等(这里设置的实际是空间中的内容位置)
Android:textsize 指定控件文字的大小
Android:width  指定控件的宽度
Android:height  指定控件的高度
Android:background  指定控件的背景色RGB 命名法
Android:padding  指定控件的内边距
Android:sigleLine  指定控件内容是否显示为一行




2.TableLayout 的使用方法
表格布局

< TableLayout ……android:stretchColumns=”0” 指定如果无法填满行时拉伸的列号(java中列号从0开始)>
<TableRow>
  控件1,控件2……每个控件占一列
</TableRow>
<TableRow>
  ……
</TableRow>
……
< /TableLayout >

2011-8-12
poolo

你可能感兴趣的:(android)