<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout 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"
tools:context=".MainActivity">
<TextView
android:id="@+id/lable"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_gravity="center"
android:text="开始注册"
android:textSize="20sp"
/>
<TextView
android:id="@+id/textView"
android:layout_width="57dp"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_marginTop="110dp"
android:text="密码:"
/>
<Button
android:id="@+id/button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_marginTop="172dp"
android:layout_marginLeft="50dp"
android:layout_marginRight="100dp"
android:text="确定" />
<Button
android:id="@+id/button2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="@+id/button"
android:layout_alignTop="@+id/button"
android:layout_marginRight="50dp"
android:layout_alignBottom="@+id/button"
android:text="取消" />
<TextView
android:id="@+id/textView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_marginTop="54dp"
android:text="手机号:"
/>
<EditText
android:id="@+id/editText3"
android:layout_width="252dp"
android:layout_height="wrap_content"
android:layout_alignBaseline="@+id/textView3"
android:layout_centerHorizontal="true"
android:ems="10"
android:inputType="textPersonName"
/>
<EditText
android:id="@+id/editText4"
android:layout_width="252dp"
android:layout_height="wrap_content"
android:layout_alignBaseline="@+id/textView"
android:layout_centerHorizontal="true"
android:ems="10"
android:inputType="textPersonName" />
</RelativeLayout>
Android--使用相对布局搭建用户注册界面
猜你喜欢
转载自blog.csdn.net/qq_39032310/article/details/83998703
今日推荐
周排行