Application of Android Development--textview

Source: Internet
Author: User

1. Overview

TextView is mainly used in the application of the Chinese text of activity. Where layout in the XML file (activity) sets the width of the text, height, id;values strings.xml set the text content.

TextView generally do the instructions or use the combination button.

2. Steps

Operations in the A:layout

1. Drag the TextView into the XML-created interface in layout to achieve the initial creation of the text

2. Set TextView code in XML

Code Explanation:

Id:

Note: There is often a lot of text in one interface, so the ID is unique.

Widthandheight:

Note: There are two ways to choose between width and height, to be full-sized, adaptive, and both.

Text

Note: text content is found by index.

Operations in the B:values

1. Set the text content and corresponding to the index

Note: This step is implemented in Values->strings.xml, name is the index name, and the text content is filled in the middle.

Application of Android Development--textview

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.