<?xml version= "1.0" encoding= "Utf-8"?>
<relativelayout
Xmlns:android= "Http://schemas.android.com/apk/res/android"
Xmlns:tools= "Http://schemas.android.com/tools"
Android:layout_width= "Match_parent"
android:layout_height= "Match_parent"
android:paddingbottom= "@dimen/activity_vertical_margin"
android:paddingleft= "@dimen/activity_horizontal_margin"
android:paddingright= "@dimen/activity_horizontal_margin"
android:paddingtop= "@dimen/activity_vertical_margin"
tools:context= "Com.tw.flag.myhyx.MainHyx" >
<textview
Android:layout_width= "wrap_content"//Setting the width of the text box
android:layout_height= "wrap_content"//Setting the height of the text box
Android:id= the ID of the "@+id/text"//text box
android:text= "User name"/>
<textview
Android:layout_width= "Wrap_content"
android:layout_height= "Wrap_content"
Android:id= "@+id/text1"
android:text= "Password"
android:layout_below= "@+id/text"//Set the current space below a certain location
android:layout_margintop= "10DP"/> Specifies the upper offset value of the moved pixel
<textview
Android:layout_width= "Wrap_content"
android:layout_height= "Wrap_content"
Android:id= "@+id/text2"
android:text= "Confirm Password"
android:layout_below= "@+id/text1"
android:layout_margintop= "10DP"/>
<edittext
Android:id= "@+id/edit1"
Android:layout_width= "200DP"
android:layout_height= "40DP"
Android:inputtype= "Textpersonname"
android:layout_marginleft= "60DP"
android:layout_margintop= " -18DP"
/>
<edittext
Android:id= "@+id/edit2"
Android:layout_width= "200DP"
android:layout_height= "40DP"
Android:inputtype= "Textpassword"
android:layout_marginleft= "60DP"
android:layout_margintop= "10DP"
/>
<edittext
Android:id= "@+id/edit3"
Android:layout_width= "200DP"
android:layout_height= "40DP"
Android:inputtype= "Textpassword"
android:layout_marginleft= "60DP"
android:layout_margintop= "35DP"
/>
<button
Android:layout_width= "Wrap_content"
android:layout_height= "Wrap_content"
android:text= "Register"
Android:id= "@+id/button"
android:layout_below= "@+id/edit3"
Android:layout_centerhorizontal= "true"//place the space horizontally centered
android:layout_margintop= "20DP"
/>
</RelativeLayout>
Android Control Basic layout