Familiar with ANDROIDAPI series 8--relativelayout comprehensive Exercises

Source: Internet
Author: User

The component layout is best determined by a sibling component or parent component to determine its location coordinates. Gravity properties, which can be placed inside the component

Prompt property hint in EditText, and how to set the input format for passwords

1 <Relativelayoutxmlns:android= "Http://schemas.android.com/apk/res/android"2 Xmlns:tools= "Http://schemas.android.com/tools"3 Android:layout_width= "Match_parent"4 Android:layout_height= "Match_parent"5 android:padding= "15DP"6 Tools:context=". Mainactivity " >7 8     <TextView9         Android:id= "@+id/labeltext"Ten Android:layout_width= "Match_parent" One Android:layout_height= "Wrap_content" A android:gravity= "Center" - Android:text= "Login Interface" /> -      the     <EditText -         Android:id= "@+id/usernametext" - Android:layout_below= "@id/labeltext" - Android:layout_width= "Wrap_content" + Android:layout_height= "Wrap_content" - Android:layout_alignright= "@id/labeltext" + Android:layout_alignleft= "@id/labeltext" A Android:hint= "username"/> at      -     <EditText -         Android:id= "@+id/passwordtext" - Android:layout_below= "@id/usernametext" - Android:layout_width= "Wrap_content" - Android:layout_height= "Wrap_content" in Android:layout_alignright= "@id/usernametext" - Android:layout_alignleft= "@id/usernametext" to Android:hint= "Password" + Android:inputtype= "Textpassword"/> -      the     <Button *         Android:id= "@+id/cancelbutton" $ Android:layout_width= "Wrap_content"Panax Notoginseng Android:layout_height= "Wrap_content" - Android:layout_below= "@id/passwordtext" the Android:layout_alignright= "@id/passwordtext" + Android:text= "Cancel"/> A      the     <Button +         Android:id= "@+id/loadbutton" - Android:layout_width= "Wrap_content" $ Android:layout_height= "Wrap_content" $ Android:layout_toleftof= "@id/cancelbutton" - Android:layout_alignbottom= "@id/cancelbutton" - Android:text= "Log In"/> the     - Wuyi </Relativelayout>
View Code

Familiar with ANDROIDAPI series 8--relativelayout comprehensive Exercises

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.