I. Common properties of TextView controls
android:id--the ID of the control
android:layout_width--width of the control
android:layout_height--height of the control
android:text--text content
android:textsize--Text Size
android:textcolor--text color
android:background--Control Background
android:singleline--Whether single-line display (True is a single line, False (default) wrap)
android:textstyle--font style (bold, italic)
android:autolink--Font links (click Text)
Second, set the TextView control in the layout file
<TextViewAndroid:id= "@+id/name"Android:layout_width= "Wrap_content"Android:layout_height= "Wrap_content"Android:text= "@string/name"android:textsize= "28SP"Android:textcolor= "#000000" /> <!--wrap_content: Wrapping the actual text content fill_parent: The current control fills the parent class container (exclusive row): 2.3api before adding a property value match_parent: The current control fills the parent class container (exclusive row ): Add a property value after 2.3api -
Android Control TextView (display text box control)