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