需求:
注册校验,注册成功后显示登录账号,用户姓名,联系电话,联系邮箱,实现数据传递。
运行图:
xml代码:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:layout_margin="10dp"
tools:context=".MainActivity8">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="登录账号:"
android:textColor="#000000"
android:textSize="20sp"/>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="请输入登录账号(字母+数字)"
android:textSize="20sp"
android:digits="0123456789qwertyuiopasdfghjklzxcvbnm"
android:id="@+id/account"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="登录密码:"
android:textColor="#000000"
android:textSize="20sp"/>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="请输入登录密码(只能为数字)"
android:textSize="20sp"
android:inputType="number"
android:password="true"
android:id="@+id/pwd1"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="确认密码:"
android:textColor="#000000"
android:textSize="20sp"/&