System login interface development and implementation (5) interface copyright component settings, copyright component

Source: Internet
Author: User

System login interface development and implementation (5) interface copyright component settings, copyright component

Development steps:

  • Open activity_login.xml in layout under res.
  • Add a TextView component object and set its attributes

Android: layout_width attribute

  • Purpose: set the component width.

Android: layout_height attribute

  • Purpose: set the height of the component.
  • Constant parameter: warp_content text adaptive, fill_parent container adaptive

Android: gravity attributes

  • Purpose: Set alignment
  • Constant parameter: horizontal alignment of center_horizontal

Android: layout_marginBottom attributes

  • Purpose: set the distance from the bottom.

Android: layout_alignParentBottom attributes

  • Purpose: Set it to align at the bottom of the parent container.

Code:

<TextView    android:layout_width="fill_parent"    android:layout_height="wrap_content"    android:text="Copyright@2015 Socrates Reserved."    android:gravity="center_horizontal"    android:textSize="12sp"    android:textColor="#000000"    android:layout_marginBottom="10dp"    android:layout_alignParentBottom="true"/>

Run:
Summary:Android: layout_alignParentBottom attributes must be relatively laid out in the parent container!

Related Article

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.