Android UI Login Interface case

Source: Internet
Author: User

Layout Management Code


<linearlayout 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"
android:orientation= "Vertical"
Tools:context= ". Mainactivity ">
<!--android:orientation= "vertical" is a linear interface that allows the interface to be applied vertically--

<!--QQ to the interface needs to write the information--
<textview
Android:id= "@+id/tv_number"
Android:layout_width= "Match_parent"
android:layout_height= "Wrap_content"
android:text= "QQ Account"

/>


<!--android:hint= "QQ number/Mobile phone number/mailbox" where hint is the content to be hidden when you enter it--
<edittext
Android:id= "@+id/et_number"
Android:layout_width= "Match_parent"
android:layout_height= "Wrap_content"
Android:hint= "QQ number/Mobile number/email"
android:layout_below= "@+id/tv_number"

/>

<textview
Android:id= "@+id/tv_pwd"
Android:layout_width= "Match_parent"
android:layout_height= "Wrap_content"
android:text= "QQ Password"

/>

<!--android:password= "true" where password is the password to be hidden into the * number, to ensure that content security
True is to agree to hide the password, false to not agree to hide the password
-
<edittext
Android:id= "@+id/et_pwd"
Android:layout_width= "Match_parent"
android:layout_height= "Wrap_content"
Android:password= "true"
android:hint= "Password"
/>

<!--switch to a relative interface--
<relativelayout
Android:layout_width= "Match_parent"
android:layout_height= "Wrap_content"
>
<!--checkbox is a check box that prompts you to remember the password--
<checkbox
Android:id= "@+id/cb_cb"
Android:layout_width= "Wrap_content"
android:layout_height= "Wrap_content"
android:text= "Remember user name and password"
/>

<!--is a login button android:onclick= "Click" is the fourth way to use the button directly when calling the method
Android:layout_width= "100DP" to make the login button box larger
android:layout_marginleft= "60DP" button like right shift 60DP, is to keep the button and the checkbox 60DP distance
-
<button
android:onclick= "click"
Android:layout_width= "100DP"
android:layout_marginleft= "60DP"
android:layout_height= "Wrap_content"
android:text= "Login"
android:layout_torightof= "@+id/cb_cb"

/>


</RelativeLayout>

</LinearLayout>


Code in Mainactivity

<linearlayout 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"
android:orientation= "Vertical"
Tools:context= ". Mainactivity ">
<!--android:orientation= "vertical" is a linear interface that allows the interface to be applied vertically--

<!--QQ to the interface needs to write the information--
<textview
Android:id= "@+id/tv_number"
Android:layout_width= "Match_parent"
android:layout_height= "Wrap_content"
android:text= "QQ Account"

/>


<!--android:hint= "QQ number/Mobile phone number/mailbox" where hint is the content to be hidden when you enter it--
<edittext
Android:id= "@+id/et_number"
Android:layout_width= "Match_parent"
android:layout_height= "Wrap_content"
Android:hint= "QQ number/Mobile number/email"
android:layout_below= "@+id/tv_number"

/>

<textview
Android:id= "@+id/tv_pwd"
Android:layout_width= "Match_parent"
android:layout_height= "Wrap_content"
android:text= "QQ Password"

/>

<!--android:password= "true" where password is the password to be hidden into the * number, to ensure that content security
True is to agree to hide the password, false to not agree to hide the password
-
<edittext
Android:id= "@+id/et_pwd"
Android:layout_width= "Match_parent"
android:layout_height= "Wrap_content"
Android:password= "true"
android:hint= "Password"
/>

<!--switch to a relative interface--
<relativelayout
Android:layout_width= "Match_parent"
android:layout_height= "Wrap_content"
>
<!--checkbox is a check box that prompts you to remember the password--
<checkbox
Android:id= "@+id/cb_cb"
Android:layout_width= "Wrap_content"
android:layout_height= "Wrap_content"
android:text= "Remember user name and password"
/>

<!--is a login button android:onclick= "Click" is the fourth way to use the button directly when calling the method
Android:layout_width= "100DP" to make the login button box larger
android:layout_marginleft= "60DP" button like right shift 60DP, is to keep the button and the checkbox 60DP distance
-
<button
android:onclick= "click"
Android:layout_width= "100DP"
android:layout_marginleft= "60DP"
android:layout_height= "Wrap_content"
android:text= "Login"
android:layout_torightof= "@+id/cb_cb"

/>
</RelativeLayout>

</LinearLayout>

Android UI Login Interface case

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.