注册页面实现
来源:互联网 发布:淘宝女装羊毛衫 编辑:程序博客网 时间:2024/05/28 03:02
最近在做一个注册页面。好久没有敲代码,布局都写了好几个小时,一下是注册页面代码,可以借鉴。
<?xml version="1.0" encoding="UTF-8"?>
<LinearLayoutxmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:gravity="center_horizontal"
android:layout_height="match_parent"
android:layout_width="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="48dp"
android:background="#ff7300"
android:layout_gravity="center_horizontal"
>
<ImageView
android:id="@+id/login_back"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/back"
android:layout_marginLeft="13dp"
android:layout_marginTop="17dp"
android:layout_centerVertical="true"
/>
<TextView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:text="新用户注册"
android:gravity="center"
android:textSize="20dp"
android:textColor="#ffffff"/>
</LinearLayout>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="25dp"
android:src="@drawable/user"/>
<TextView
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_marginTop="13dp"
android:hint="以下所有信息都是必填项"
android:textColor="#c7c7cd"/>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="18dp"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="43dp"
android:gravity="center_vertical"
android:text="用 户 名"
android:textColor="#555555"
android:textSize="17dp"/>
<EditText
android:id="@+id/et_number"
android:layout_height="26dp"
android:layout_width="fill_parent"
android:layout_marginRight="10dp"
android:hint="以字母开头,4-20位字符"
android:layout_marginLeft="10dp"
android:paddingLeft="10dp"
android:textSize="13dp"
android:background="@drawable/login_shape_bg"/>
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="59dp"
android:gravity="center_vertical"
android:text="密 码"
android:textColor="#555555"
android:textSize="17dp"/>
<EditText
android:id="@+id/et_password"
android:layout_height="26dp"
android:layout_width="fill_parent"
android:layout_marginRight="10dp"
android:hint="6-20个数字和字母组合"
android:layout_marginLeft="10dp"
android:paddingLeft="10dp"
android:textSize="13dp"
android:background="@drawable/login_shape_bg"/>
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="25dp"
android:gravity="center_vertical"
android:text=" 确认密码"
android:textColor="#555555"
android:textSize="17dp"/>
<EditText
android:id="@+id/et_repassword"
android:layout_height="26dp"
android:layout_width="fill_parent"
android:layout_marginRight="10dp"
android:hint="请确认密码"
android:layout_marginLeft="10dp"
android:paddingLeft="10dp"
android:textSize="13dp"
android:textColor="#555555"
android:background="@drawable/login_shape_bg"/>
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="17dp"
android:textColor="#555555"
android:layout_marginLeft="25dp"
android:gravity="center_vertical"
android:text=" 验证手机"/>
<EditText
android:id="@+id/tv_phone_check_area"
android:layout_height="26dp"
android:layout_width="39dp"
android:hint="+86"
android:textSize="13dp"
android:layout_marginLeft="10dp"
android:paddingLeft="8dp"
android:textColor="#555555"
android:background="@drawable/login_shape_bg"/>
<TextView
android:layout_width="10dp"
android:layout_height="wrap_content"
android:paddingLeft="3dp"
android:paddingRight="3dp"
android:text="-"
/>
<EditText
android:id="@+id/tv_register_phone"
android:layout_width="fill_parent"
android:layout_height="26dp"
android:layout_marginRight="10dp"
android:hint="请输入手机号"
android:textSize="13dp"
android:paddingLeft="10dp"
android:textColor="#c7c7cd"
android:background="@drawable/login_shape_bg"
/>
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="31dp"
android:layout_marginTop="16dp"
android:orientation="horizontal" >
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="26dp"
android:gravity="center_vertical"
android:paddingTop="2dp" >
<TextView
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_marginLeft="41dp"
android:paddingTop="2dp"
android:text=" 验证码"
android:textColor="#555555"
android:textSize="17dp" />
<EditText
android:id="@+id/et_phone_check"
android:layout_width="136dp"
android:layout_height="fill_parent"
android:layout_marginLeft="10dp"
android:background="@drawable/login_shape_bg"
android:hint="请输入短信验证码"
android:paddingLeft="10dp"
android:textColor="#c7c7cd"
android:textSize="13dp" />
</LinearLayout>
<TextView
android:id="@+id/tv_phonecheck_code"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:layout_marginLeft="11dp"
android:layout_marginRight="10dp"
android:background="#ffe8d5"
android:gravity="center"
android:text="获取验证码"
android:textColor="#6d3405"
android:textSize="14dp" />
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="15dp"
android:layout_gravity="center_horizontal">
<ImageView
android:id="@+id/iv_checkbox"
android:layout_width="25dp"
android:layout_height="25dp"
android:layout_marginLeft="60dp"
android:background="@drawable/unchecked"
/>
<TextView
android:id="@+id/tv_protocol"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginLeft="20dp"
android:textColor="#2fa4e7"
android:textSize="16dp"
android:text="查看《XX电商用户注册协议》"/>
</LinearLayout>
<ImageView
android:id="@+id/iv_register"
android:layout_width="130dp"
android:layout_height="34dp"
android:layout_marginTop="10dp"
android:background="@drawable/unpress"/>
<ImageView
android:layout_width="fill_parent"
android:layout_height="2dp"
android:layout_marginTop="10dp"
android:background="#c7c7cd"/>
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="10dp" >
<TextView
android:id="@+id/tv_zpnumber"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="已有XX账号?"
android:textColor="#555555"
android:textSize="16dp" />
<TextView
android:id="@+id/tv_relogin"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="25dp"
android:layout_toRightOf="@+id/tv_zpnumber"
android:text="那就赶快登录吧!"
android:textColor="#2fa4e7"
android:textSize="16dp" />
</RelativeLayout>
<ImageView
android:id="@+id/login"
android:layout_width="130dp"
android:layout_height="34dp"
android:background="@drawable/login"
android:layout_marginTop="10dp"
/>
</LinearLayout>
0 0
- 注册页面实现
- 注册页面实现
- 注册页面实现
- PHP注册页面实现
- MVC实现简单注册页面
- android中注册页面实现
- 典型注册页面JSP实现
- js注册页面的实现
- 用户注册页面的实现
- 实现注册页面中的倒计时功能代码
- Ajax实现异步交互完成注册页面
- JQuery实现注册页面提示语
- magento在同一个页面实现登陆注册
- jsp实现注册与登录页面+sqlsever2008
- html+css+table实现注册页面设计
- 超简单的登陆注册页面实现
- 用ajax实现注册页面一些处理
- Storyboard学习五(简单注册页面实现)
- Android Volley完全解析(三),定制自己的Request
- C# Devexpress gridControl 自定义编辑器 设置弹出框(弹出框包含gridLookUpEdit)
- 51-题目1163:素数
- php工厂模式
- Linux基础之Vi编辑器快捷键
- 注册页面实现
- Android Volley完全解析(四),带你从源码的角度理解Volley
- 不重复随机数生成
- ios开发学习:生命属性时的Strong和Weak的区别及用法
- Scroll滑动Activity
- vim的一些常用小技巧
- ARC和非ARC混合使用
- MySQL高效分页解决方案集
- 在 Ubuntu 上安装 LaTeX