TextView (Display text box control)
1. 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
<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 -
Second, EditText (Input TextBox control)
1. Common Properties of EditText 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 (default values can be set)
android:textsize--Text Size
android:textcolor--text color
android:background--Control Background
android:hint--input Hint text
android:inputtype--Input Text Type
< EditText Android:id = "@+id/editname" android:layout_width= "Match_parent" android:layout_height= "Wrap_ Content " android:inputtype=" Textpersonname " android:hint = "@string/editname"> </EditText>
Android Control TextView (display text box control) and EditText (Input TextBox control)