Today we have learned some of the ways to use controls, including Textview,editview,imageview
1.TextView, output a text chant
The main attributes are
Android:id logo
Android:layout_width width
Android:layout_height height
Android:text text content
Android:textsize Text Size
Android:textcolor text color
Android:background background
2.EditView, enter a text
The main attributes are the same
In addition there are
Android:hint input Hint text
Android:inputtype Input Text Type
Here's the Hint property, unlike the Text property used in EditView
Simply put, if you set hint or text to "123"
When you enter "456"
Hint to "456"
And the text is "123456"
3.ImageView, a space for displaying pictures
property is almost
Another android:src image source
Two points to note here
1) Android:layout_width has three more special values
Match_parents: Enlarges the control so that it fills up all the space of its parent unit
Wrap_content: Expand controls based on content
Fill_parents: Rarely used after similar API2.2 to Match_parents
2) The difference between SRC and background
When you use SRC and background to load a picture at the same time
SRC does not fill the entire space, does not stretch according to the space size, background instead
Above
Android Development Learning Diary Day3--textview,editview,imageview