- 论坛徽章:
- 0
|
Demo2\youhao\src\main\res\layout\activity_main.xml- <TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:stretchColumns="1"
- tools:context=".MainActivity">
- <TableRow>
- <TextView
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:text="用户名"
- android:textSize="16dp" />
- <EditText
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:hint="请填写登录账号"
- android:selectAllOnFocus="true" />
- </TableRow>
- <TableRow>
- <TextView
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:text="密码"
- android:textSize="16dp" />
- <EditText
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:hint="请填写登录密码"
- android:inputType="numberPassword" />
- </TableRow>
- <TableRow>
- <TextView
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:text="年龄"
- android:textSize="16dp" />
- <EditText
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:hint="请填写年龄"
- android:inputType="number" />
- </TableRow>
- <TableRow>
- <TextView
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:text="生日"
- android:textSize="16dp" />
- <EditText
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:hint="请填写生日"
- android:inputType="date" />
- </TableRow>
- <TableRow>
- <TextView
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:text="电话号码"
- android:textSize="16dp" />
- <EditText
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:hint="请填写电话号码"
- android:inputType="phone"
- android:selectAllOnFocus="true" />
- </TableRow>
- <Button
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="注册
- " />
- </TableLayout>
复制代码 |
|