Android Control Basic layout

Source: Internet
Author: User

<?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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.