各位看官姥爷:

对于一款android手机app而言,美观的界面使得用户有好的使用体验,而一款好看的注册登录界面也会给用户好的用户体验,那么话不多说,直接上代码

首先是一款简单的界面展示

1.登陆界面

2.注册界面

好的,那么我们废话不多说 ,直接上代码吧:

1.登录界面

LoginActivity.xml

2.注册界面

<?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:orientation="vertical"> <androidx.appcompat.widget.Toolbar
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="@color/blue"> <RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"> <ImageButton
android:id="@+id/IV_backtologin"
android:layout_width="40dp"
android:layout_height="40dp"
android:backgroundTint="#0000"
android:src="@mipmap/back"
android:tint="@color/white" /> <TextView
android:id="@+id/reg_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:text="用户注册"
android:textColor="@color/white"
android:textSize="18sp"
android:textStyle="bold" /> <Button
android:id="@+id/bt_re_register"
android:layout_width="60dp"
android:layout_height="40dp"
android:layout_marginLeft="72dp"
android:layout_marginTop="5dp"
android:layout_toRightOf="@+id/reg_title"
android:background="@drawable/buttonstyle"
android:text="注册"
android:textColor="@color/white" />
</RelativeLayout> </androidx.appcompat.widget.Toolbar> <ImageView
android:id="@+id/IV_user_icno_register"
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_gravity="center"
android:layout_marginTop="30dp"
android:background="?android:attr/selectableItemBackground"
android:clickable="true"
android:scaleType="fitXY"
android:src="@mipmap/usericon_default" />
<!--tips-->
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="25dp"
android:orientation="vertical"> <TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="基本信息 |"
android:textColor="@color/black"
android:textStyle="bold" /> <View
android:layout_width="70dp"
android:layout_height="1dp"
android:layout_marginTop="2dp"
android:background="@color/light_grey" />
</LinearLayout>
<!--昵称-->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="25dp"
android:layout_marginTop="15dp"
android:layout_marginRight="25dp"
android:background="@drawable/reg_et_style"
android:orientation="horizontal"> <TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:gravity="center"
android:text="昵 称:" /> <EditText
android:id="@+id/et_reg_nickname"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="3"
android:hint="字母或者数字昵称"
android:maxLines="1"
android:singleLine="true" />
</LinearLayout>
<!--密码-->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="25dp"
android:layout_marginTop="5dp"
android:layout_marginRight="25dp"
android:background="@drawable/reg_et_style"
android:orientation="horizontal"> <TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center" android:layout_weight="1"
android:gravity="center"
android:text="密 码:" /> <EditText
android:id="@+id/et_reg_pass"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="3"
android:hint="键入您的密码"
android:maxLines="1"
android:singleLine="true" />
</LinearLayout>
<!--tips-->
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="25dp"
android:layout_marginTop="15dp"
android:orientation="vertical"> <TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="详细信息 |"
android:textColor="@color/black"
android:textStyle="bold" /> <View
android:layout_width="70dp"
android:layout_height="1dp"
android:layout_marginTop="2dp"
android:background="@color/light_grey" />
</LinearLayout>
<!--姓名-->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="25dp"
android:layout_marginTop="15dp"
android:layout_marginRight="25dp"
android:background="@drawable/reg_et_style"
android:orientation="horizontal"> <TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:gravity="center"
android:text="真实姓名:" /> <EditText
android:id="@+id/et_reg_username"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="3"
android:hint="真实姓名"
android:maxLines="1"
android:singleLine="true" />
</LinearLayout>
<!--性别-->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="25dp"
android:layout_marginTop="5dp"
android:layout_marginRight="25dp"
android:background="@drawable/reg_et_style"
android:orientation="horizontal"> <TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:gravity="center"
android:text="性 别:" /> <RadioGroup
android:id="@+id/reg_userSex"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="3"
android:orientation="horizontal"> <RadioButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="男" /> <RadioButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="女" />
</RadioGroup> </LinearLayout>
<!--地址-->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="25dp"
android:layout_marginTop="5dp"
android:layout_marginRight="25dp"
android:background="@drawable/reg_et_style"
android:orientation="horizontal"> <TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:gravity="center"
android:text="地 址:" /> <EditText
android:id="@+id/et_reg_add"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="3"
android:hint="--省--市--县"
android:maxLines="1"
android:singleLine="true" />
</LinearLayout>
<!--电话-->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="25dp"
android:layout_marginTop="5dp"
android:layout_marginRight="25dp"
android:background="@drawable/reg_et_style"
android:orientation="horizontal"> <TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:gravity="center"
android:text="联系方式:" /> <EditText
android:id="@+id/et_reg_tel"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="3"
android:hint="###-####-####"
android:inputType="number"
android:maxLines="1"
android:singleLine="true" />
</LinearLayout>
<!--验证码-->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="25dp"
android:layout_marginTop="5dp"
android:layout_marginRight="25dp"
android:background="@drawable/reg_et_style"
android:orientation="horizontal">
<!-- 第四个文本编辑框 输入验证码 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:orientation="horizontal"> <TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:paddingLeft="25dp"
android:text="验 证 码:" /> <EditText
android:id="@+id/et_registeractivity_phoneCodes"
android:layout_width="0dp"
android:layout_height="50dp"
android:layout_marginLeft="10dp"
android:layout_marginTop="5dp"
android:layout_marginRight="10dp"
android:layout_weight="3"
android:hint="右图4位验证码"
android:maxLines="1"
android:paddingLeft="10dp" /> <ImageView
android:id="@+id/iv_registeractivity_showCode"
android:layout_width="0dp"
android:layout_height="70dp"
android:layout_marginTop="-10dp"
android:layout_weight="1.5"
android:clickable="true"
android:onClick="onClick" />
</LinearLayout>
</LinearLayout> <TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:layout_marginRight="25dp"
android:text="@string/register_pic_tips"
android:textSize="8sp" /> </LinearLayout>

RegActivity.xml

Android 比较好看的注册登录界面的更多相关文章

  1. UI4_注册登录界面

    // // ViewController.h // UI4_注册登录界面 // // Created by zhangxueming on 15/7/3. // Copyright (c) 2015年 ...

  2. Android studio 开发一个用户登录界面

    Android studio 开发一个用户登录界面 activity_main.xml <?xml version="1.0" encoding="utf-8&qu ...

  3. Android开发实例之miniTwitter登录界面的实现

    原文: http://www.jizhuomi.com/android/example/134.html 本文要演示的Android开发实例是如何完成一个Android中的miniTwitter登录界 ...

  4. Android 仿 窗帘效果 和 登录界面拖动效果 (Scroller类的应用) 附 2个DEMO及源码

    在android学习中,动作交互是软件中重要的一部分,其中的Scroller就是提供了拖动效果的类,在网上,比如说一些Launcher实现滑屏都可以通过这个类去实现.下面要说的就是上次Scroller ...

  5. Android 仿 窗帘效果 和 登录界面拖动效果 (Scroller类的应用) 附 2个DEMO及源代码

    在android学习中,动作交互是软件中重要的一部分.当中的Scroller就是提供了拖动效果的类,在网上.比方说一些Launcher实现滑屏都能够通过这个类去实现.以下要说的就是上次Scroller ...

  6. Android 记住密码和自动登录界面的实现(SharedPreferences 的用法)

    原文:http://blog.csdn.net/liuyiming_/article/details/7704923 SharedPreferences介绍: SharedPreferences是An ...

  7. RxSwift 实战操作【注册登录】

    前言 看了前面的文章,相信很多同学还不知道RxSwift该怎么使用,这篇文件将带领大家一起写一个 注册登录(ps:本例子采用MVVM)的例子进行实战.本篇文章是基于RxSwift3.0写的,采用的是C ...

  8. vue2.0+koa2+mongodb实现注册登录

    前言 前段时间和公司一个由技术转产品的同事探讨他的职业道路,对我说了一句深以为然的话: "不要把自己禁锢在某一个领域,技术到产品的转变,首先就是思维上的转变.你一直做前端,数据的交互你只知道 ...

  9. Android studio登录界面

    打开Android studio,你需要建立两个类LoginMainAcitivity.java和SuccessMainActivity.java,和与之相对应的xml布局文件login_main.x ...

随机推荐

  1. Java三种IO模型和LinuxIO五种IO模型

    Java: https://github.com/Snailclimb/JavaGuide/blob/master/docs/java/BIO-NIO-AIO.md https://github.co ...

  2. python 基础学习3 列表和元组 、字符串

    作为小白,坚持每日写学习记录,是督促坚持学习的动力, 今天主要是学习 列表和元组,列表是可以修改的,元组是不可变的.列表和元组的索引都是从0开始 列表可以修改, 可以对列表进行赋值,修改移除等各种方法 ...

  3. centos设系统置语言为中文

    [root@host /]# vim /etc/sysconfig/i18n #i18n 是 internationalization 的缩写形式,意即在 i 和 n 之间有 18 个字母,本意是指软 ...

  4. 3.DHCP原理

    1.DHCP服务器给首次接入网络的客户端分配网络参数的工作原理 只有跟DHCP客户端在同一个网段的DHCP服务器才能收到DHCP客户端广播的DHCP DISCOVER报文.当DHCP客户端与DHCP服 ...

  5. HarmonyOS应用开发-Component体系介绍(一)

    目录: 1. Component的内部类/接口 2. Component方法简介 3.总结 在HarmonyOS的UI框架中,Component为用户界面提供基本组件,Component类位于ohos ...

  6. docker(7)docker-compose容器集群编排

    前言 实际工作中我们部署一个应用,一般不仅仅只有一个容器,可能会涉及到多个,比如用到数据库,中间件MQ,web前端和后端服务,等多个容器. 我们如果一个个去启动应用,当项目非常多时,就很难记住了,所有 ...

  7. Codeforces Round #587 (Div. 3) F Wi-Fi(线段树+dp)

    题意:给定一个字符串s 现在让你用最小的花费 覆盖所有区间 思路:dp[i]表示前i个全覆盖以后的花费 如果是0 我们只能直接加上当前位置的权值 否则 我们可以区间询问一下最小值 然后更新 #incl ...

  8. 2019牛客暑期多校训练营(第十场)E-Hilbert Sort(分形)

    >传送门< 题意 现给出你 $n $个坐标和 $k$,让你根据$ k$阶 希尔伯特曲线的走向排列给出的 $n $个坐标 希尔伯特曲线如下:  $k=1$ $k=2$ $k=3$可以将边长为 ...

  9. Codeforces Global Round 7 B. Maximums(逻辑)

    题意: 有数组 an,定义 xi 为 a 的前 i - 1 位的最大值(x0 = 0),定义 bi 为 ai - xi,给出数组 bn,还原数组 an. 思路: 因为 x0 = 0,所以 b0 = a ...

  10. zjnu1762 U (线段树)

    Description Mirko is hungry as a bear, scratch that, programmer and has stumbled upon a local restau ...