Android布局之LinearLayout与TableLayout的嵌套使用
来源:互联网 发布:js select改变事件 编辑:程序博客网 时间:2024/06/06 08:31
效果如图:
布局文件如下:
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent"> <TextView android:layout_marginTop="120dp" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" android:textSize="50sp" android:text="@string/registerWarning"/> <TableLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginTop="90dp"> <TableRow> <TextView android:text="@string/name" android:layout_width="300dp" android:textSize="50sp" android:layout_marginLeft="60dp"/> <EditText android:id="@+id/nameEdit" android:hint="@string/option" android:layout_width="300dp" android:textSize="50sp" android:layout_marginRight="30dp"> </EditText> </TableRow> </TableLayout> <TableLayout android:layout_marginTop="30dp" android:layout_width="fill_parent" android:layout_height="wrap_content"> <TableRow> <TextView android:text="@string/sex" android:layout_width="300dp" android:textSize="50sp" android:layout_marginLeft="60dp"/> <Spinner android:id="@+id/sexSpinner" android:layout_width="300dp" android:entries="@array/sexs" android:hint=""> </Spinner> </TableRow> </TableLayout> <TableLayout android:layout_marginTop="30dp" android:layout_width="fill_parent" android:layout_height="wrap_content"> <TableRow> <TextView android:text="@string/old" android:layout_width="300dp" android:textSize="50sp" android:layout_marginLeft="60dp"/> <EditText android:id="@+id/oldEdit" android:hint="" android:layout_width="300dp" android:textSize="50sp" android:inputType="number" android:layout_marginRight="30dp"> </EditText> </TableRow> </TableLayout> <TableLayout android:layout_marginTop="30dp" android:layout_width="fill_parent" android:layout_height="wrap_content"> <TableRow> <TextView android:text="@string/career" android:layout_width="300dp" android:textSize="50sp" android:layout_marginLeft="60dp"/> <Spinner android:id="@+id/careerSpinner" android:layout_width="300dp" android:entries="@array/careers" android:hint=""> </Spinner> </TableRow> </TableLayout> <TableLayout android:layout_marginTop="30dp" android:layout_width="fill_parent" android:layout_height="wrap_content"> <TableRow> <TextView android:text="@string/study" android:layout_width="300dp" android:textSize="50sp" android:layout_marginLeft="60dp"/> <EditText android:id="@+id/studyEdit" android:hint="@string/option" android:layout_width="300dp" android:textSize="50sp" android:layout_marginRight="30dp"> </EditText> </TableRow> </TableLayout> <Button android:layout_marginTop="80dp" android:id="@+id/enter" android:layout_width="500dp" android:layout_height="wrap_content" android:layout_gravity="center" android:text="@string/enterTest" android:textSize="50sp"> </Button> </LinearLayout>
0 0
- Android布局之LinearLayout与TableLayout的嵌套使用
- 01-10:LinearLayout与TableLayout嵌套布局
- Android学习笔记(八)布局之LinearLayout与TableLayout
- Android 布局LinearLayout TableLayout
- Android布局LinearLayout的嵌套使用
- Activity的布局初步(二)嵌套布局【LinearLayout、TableLayout】
- android布局之TableLayout使用
- Android LinearLayout布局嵌套及权重weight的使用
- Android常见布局控件之LinearLayout和TableLayout
- Android之四大布局【LinearLayout,TableLayout,FrameLayout,RelativeLayout】
- Android的布局管理器(上篇)-LinearLayout、TableLayout、FrameLayout、RelativeLayout
- Android 布局(LinearLayout\TableLayout\RelativeLayout\AbsoluteLayout\FrameLayout)
- Android 布局(LinearLayout\TableLayout\RelativeLayout\AbsoluteLayout\FrameLayout)
- android布局LinearLayout的使用
- Android布局之TableLayout
- Android之TableLayout布局
- android之【TableLayout布局】
- Android之TableLayout布局
- 基于HttpClient4.3实现的Http后台请求
- s5pv210 cmos摄像头驱动(二)
- cocos2d-x 新手上路
- 代码面试最常用的10大算法
- HTML Entities & Charset & URL Encode
- Android布局之LinearLayout与TableLayout的嵌套使用
- 黑马程序员:查表法解决进制转换
- 学习笔记_web——表单验证
- 排序之快速排序
- 使用myeclipse搭建struts2环境
- 10 个 lsof 命令行的使用示例
- 【LeetCode】Decode Ways
- HDU - 3450 Counting Sequences
- 关于 win8.1 激活问题