Andorid关于注册游戏帐号界面(UI)
2015-11-27 16:02
423 查看
一丶先上效果图二丶参考代码RegistActivity
package com.ythl.shouyoufanli.activity; import com.ythl.shouyoufanli.R; import android.app.Activity; import android.os.Bundle; /** * @author Administrator * 注册帐号界面 */ public class RegistActivity extends Activity{ @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); initView(); } /** * 初始化控件 */ private void initView() { setContentView(R.layout.activity_regist); } }
activity_regist.xml
<pre name="code" class="html"><?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"android:layout_width="match_parent"android:layout_height="match_parent"android:background="#E1E0DE"android:orientation="vertical" ><!-- 引用titlebar --><include layout="@layout/title_bar" /><!-- 手机号 --><LinearLayoutandroid:layout_width="fill_parent"android:layout_height="wrap_content"android:layout_marginLeft="8dp"android:layout_marginRight="8dp"android:layout_marginTop="20dp"android:background="@drawable/rounded_edittext"android:paddingBottom="10dp"android:paddingTop="10dp" ><TextViewandroid:layout_width="wrap_content"android:layout_height="wrap_content"android:layout_marginLeft="10dp"android:text="手机号" /><EditTextandroid:id="@+id/et_regist_phonenumber"android:layout_width="fill_parent"android:layout_height="wrap_content"android:layout_marginLeft="5dp"android:background="@null"android:hint="输入手机号"android:textSize="12sp" /></LinearLayout><!-- 验证码 --><LinearLayoutandroid:layout_width="fill_parent"android:layout_height="wrap_content"android:layout_marginLeft="8dp"android:layout_marginRight="8dp"android:layout_marginTop="8dp"android:background="@drawable/rounded_edittext"android:orientation="horizontal"android:paddingBottom="10dp"android:paddingTop="10dp" ><TextViewandroid:layout_width="wrap_content"android:layout_height="wrap_content"android:layout_marginLeft="10dp"android:text="验证码" /><EditTextandroid:id="@+id/et_regist_authcode"android:layout_width="150dp"android:layout_height="wrap_content"android:layout_marginLeft="5dp"android:background="@null"android:hint="输入验证码"android:inputType="text"android:textSize="12sp" /><TextViewandroid:id="@+id/tv_regist_getensurecode"android:layout_width="wrap_content"android:layout_height="wrap_content"android:layout_marginLeft="25dp"android:text="获取验证码"android:textColor="#0099cc"android:textSize="12sp" /></LinearLayout><!-- 设置密码 --><LinearLayoutandroid:layout_width="fill_parent"android:layout_height="wrap_content"android:layout_marginLeft="8dp"android:layout_marginRight="8dp"android:layout_marginTop="8dp"android:background="@drawable/rounded_edittext"android:paddingBottom="10dp"android:paddingTop="10dp" ><TextViewandroid:layout_width="wrap_content"android:layout_height="wrap_content"android:layout_marginLeft="10dp"android:text="设置密码" /><EditTextandroid:id="@+id/et_regist_pwd"android:layout_width="fill_parent"android:layout_height="wrap_content"android:layout_marginLeft="5dp"android:background="@null"android:hint="6-16位字符,区分大小写"android:inputType="textPassword"android:textSize="11sp" /></LinearLayout><LinearLayoutandroid:layout_width="wrap_content"android:layout_height="wrap_content"android:layout_marginBottom="5dp"android:layout_marginLeft="20dp"android:layout_marginTop="5dp"android:orientation="horizontal" ><!-- 单选框 --><CheckBoxandroid:id="@+id/cb_regist_checked"android:layout_width="wrap_content"android:layout_height="wrap_content"android:text="我同意"android:textSize="10sp" /><TextViewandroid:id="@+id/tv_regist_deal"android:layout_width="wrap_content"android:layout_height="wrap_content"android:text="@string/clause"android:textColor="#0099cc"android:textSize="10sp" /></LinearLayout><!-- 注册按钮 --><Buttonandroid:id="@+id/bt_regist_ensure"android:layout_width="fill_parent"android:layout_height="wrap_content"android:background="@drawable/ensure_regist_edittext"android:gravity="center"android:text="同意以上协议,马上注册"android:textColor="#ffffff"android:textSize="12sp" /></LinearLayout>strings.xml
<?xml version="1.0" encoding="utf-8"?><resources><string name="app_name">Demo</string><string name="action_settings">Settings</string><string name="hello_world">Hello world!</string>
<string name="clause"><u>《快返手游返利平台服务条款》</u></string></resources>ensure_regist_edittext.xml
<?xml version="1.0" encoding="utf-8"?><!-- shape为 矩形 --><shape xmlns:android="http://schemas.android.com/apk/res/android"android:padding="10dp"android:shape="rectangle" ><!-- 填充的颜色 --><solid android:color="#0099cc" /><!-- 设置矩形的四个角为弧形 --><!-- android:radius 弧形的半径 --><cornersandroid:bottomLeftRadius="7dp"android:bottomRightRadius="7dp"android:topLeftRadius="7dp"android:topRightRadius="7dp" /></shape>rounded_edittext.xml
<?xml version="1.0" encoding="utf-8"?><!-- shape为 矩形 --><shape xmlns:android="http://schemas.android.com/apk/res/android"android:padding="10dp"android:shape="rectangle" ><!-- 填充的颜色 --><solid android:color="#FFFFFF" /><!-- 设置矩形的四个角为弧形 --><!-- android:radius 弧形的半径 --><cornersandroid:bottomLeftRadius="7dp"android:bottomRightRadius="7dp"android:topLeftRadius="7dp"android:topRightRadius="7dp" /></shape>
相关文章推荐
- GUI - Web前端开发框架
- 评价ui设计作品好坏的八个标准(界面/交互设计研究)
- 为Yahoo! UI Extensions Grid增加内置的可编辑器
- Cocos2d-x UI开发之文本类使用实例
- winform异型不规则界面设计的实现方法
- 谈谈对jquery ui tabs 的理解
- 在IE 浏览器中使用 jquery的fadeIn() 效果 英文字符字体加粗
- UI Events 用户界面事件
- jquery UI Datepicker时间控件的使用方法(基础版)
- 基于jQuery UI CSS Framework开发Widget的经验
- jquery ui 1.7 ui.tabs 动态添加与关闭(按钮关闭+双击关闭)
- jQuery UI设置固定日期选择特效代码分享
- Jquery ajax 同步阻塞引起的UI线程阻塞问题
- jQuery UI的Dialog无法提交问题的解决方法
- jQuery ui实现动感的圆角渐变网站导航菜单效果代码
- jquery UI Datepicker时间控件的使用方法(终结版)
- jquery UI Datepicker时间控件的使用方法(加强版)
- 关于jQuery UI 使用心得及技巧
- jQuery ui 1.7更新小结
- 从零开始学习jQuery (十) jQueryUI常用功能实战