Android项目注册页面的搭建

来源:互联网 发布:微创软件 编辑:程序博客网 时间:2024/06/02 04:45

今天工作基本完成,所以闲着没事,写个注册界面布局练练手,供大家取样,使用.如若觉得有可取之处,那就方便了大家以后可以直接取来用,节省时间.

多的就不讲了,直接上代码吧:

<?xml version="1.0" encoding="utf-8"?><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"    tools:context="com.example.niu.inputapp.MainActivity"    android:background="#fff"    android:stretchColumns="1">    <TableRow>        <TextView            android:layout_width="match_parent"            android:layout_height="wrap_content"            android:text="用户名:"            android:textSize="16sp"/>        <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="16sp"/>        <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="16sp"/>        <EditText            android:layout_width="match_parent"            android:layout_height="wrap_content"            android:inputType="number"/>    </TableRow>    <TableRow>        <TextView            android:layout_width="match_parent"            android:layout_height="wrap_content"            android:text="生日:"            android:textSize="16sp"/>        <EditText            android:layout_width="match_parent"            android:layout_height="wrap_content"            android:inputType="date"/>    </TableRow>    <TableRow>        <TextView            android:layout_width="match_parent"            android:layout_height="wrap_content"            android:text="电话号码:"            android:textSize="16sp"/>        <EditText            android:layout_width="match_parent"            android:layout_height="wrap_content"            android:hint="请输入你的电话号码"            android:selectAllOnFocus="true"            android:inputType="phone"/>    </TableRow>    <Button        android:layout_width="wrap_content"        android:layout_height="wrap_content"        android:text="注册"/></TableLayout>

0 0
原创粉丝点击