表格布局(TableLayout)的简单使用
来源:互联网 发布:淘宝开店怎么刷销量 编辑:程序博客网 时间:2024/03/28 23:45
表格布局以行、列表格的方式布局子组件。TableLayout中使用TableRow对象来定义多行。
布局XML:
<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" > <TableLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:collapseColumns="2" android:stretchColumns="1" > <TableRow android:layout_width="wrap_content" android:layout_height="wrap_content" > <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="用户名" /> <EditText android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="admin" /> </TableRow> <TableRow android:layout_width="wrap_content" android:layout_height="wrap_content" > <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="密码" /> <EditText android:layout_width="wrap_content" android:layout_height="wrap_content" android:password="true" android:text="123" /> </TableRow> </TableLayout> <LinearLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:gravity="center" > <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="注册" /> <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="登录" /> </LinearLayout></LinearLayout>
附上图片效果:
- 表格布局(TableLayout)的简单使用
- TableLayout表格简单的使用
- TableLayout简单的写个表格布局
- android表格布局TableLayout的使用
- Android TableLayout(表格布局) 使用介绍
- 四.简单的TableLayout布局
- 表格布局的简单使用
- TableLayout的简单使用
- android-TableLayout 表格布局
- TableLayout表格布局UI
- 表格布局 TableLayout
- TableLayout 表格布局管理器
- Android 表格布局<TableLayout>
- 表格布局TableLayout
- TableLayout表格布局学习
- android:TableLayout表格布局
- android:TableLayout表格布局
- TableLayout表格布局详解
- uestc oj 1488 Flip Game
- struts2文件下载出现Can not find a java.io.InputStream with the name [imageStream] in the invocation stack.
- uestc oj 1670 积木
- java 对一单词的找出全部组合
- uestc oj 1230 Picture
- 表格布局(TableLayout)的简单使用
- Codeforces Round #187 (Div. 2) 只水果两题。。。
- POJ 1177 Picture (线段树+离散化+扫描线) 详解
- 黑马程序员--第十八天:IO流第一天
- 线段树(segment tree)
- 黑马程序员—java基础之反射与正则表达式
- MFC Edit控件 error:“DDX_Control”: 不能将参数 3 从“int”转换为“CWnd &”
- stagefright与opencore对比(转)
- uestc oj 1829 How Many Buildings