First, relativelayout layout
Relativelayout layout (case: Relativelayout login)
2.3.1 Relativelayout Concept
2.3.2 Position properties relative to sibling controls
Android:layout_above= "@id/center_btn" is above a control
android:layout_below= "@id/center_btn" is under one of the controls
android:layout_toleftof= "@id/center_btn" is on the left side of a control
android:layout_torightof= "@id/center_btn" is on the right side of a control
2.3.3 Alignment Properties relative to sibling controls
android:layout_alignleft= "@id/center_btn" and the left side of a control
android:layout_alignright= "@id/center_btn" and the right side of a control
android:layout_aligntop= "@id/center_btn" and the upper alignment of a control
android:layout_alignbottom= "@id/center_btn" and the bottom of a control
2.3.4 The position alignment property relative to the parent control
Android:layout_alignparentright= "true" aligns to the right of the parent container
Android:layout_alignparentbottom= "true" and align bottom of parent container
Android:layout_alignparentleft= "true" aligns to the left of the parent container
Android:layout_alignparenttop= "true" to align with parent container top
Android:layout_centerhorizontal= "True" controls are centered horizontally relative to the parent container
Android:layout_centervertical= "True" controls are centered vertically relative to the parent container
Android:layout_centerinparent= "True" is in the middle of the parent container
2.3.5 Other properties
Android:layout_alignbaseline= "@id/tv1" baseline alignment (text alignment in controls)
Ii. Other layout controls (case: Otherlayout)
2.4.1 Framelayout Frame Layout
2.4.2 GridLayout Layout
Android:layout_column setting the specific location of each child control
Android:layout_row setting the specific location of each child control
Android:layout_columnspan Merge Columns
Android:layout_rowspan Merge Rows
Android:layout_gravity setting how controls are extended
Third, TextView properties
Andorid:text Setting text
Android:textcolor Setting text color
Android:textsize Setting the font size
Android:singleline setting whether single-line display
Android:gravity
Android:drawableleft indicates that a picture is displayed to the left of the text
Android:drawableright
Android:drawabletop
Android:drawablebottom
Android:autolink automatically identifies the phone number or HTTP address or email address in the text
Android:typeface Setting fonts
Android:maxlength set TextView maximum number of characters
Iv.. EditText Properties
Android:inputtype setting the type of input content
Android:hint setting Prompt text
Android:imeoptions set the hint text in the lower right corner of the soft keyboard
Five, button commonly used property introduction and listener use
1.android:onclick Property
2.Button Binding Listener Mode
Setonclicklistener ();
Six, ImageView Common properties Introduction
Andorid:src
Android:adjustviewbounds (see source)
Android:maxheight
Andorid:maxwidth (used with Adjustviewbounds, MaxHeight and maxWidth at the same time only one function)
Android:scaletype
ScaleType value type:
1.matrix: Indicates that the original image is drawn from the upper left corner of the ImageView
If the original is larger than ImageView, then the extra part is trimmed off,
If the original is less than ImageView, no processing is done on the original.
The goal of 2.fitxy:fitxy is to fill the entire ImageView,
To accomplish this, it needs to do some zooming on the picture,
During scaling, it does not scale according to the proportions of the original image.
3.fitStart: Scales the picture proportionally to the width or height of the view (wide width
High minimum value), and then the top or left display (with the front zoom to the width
or high-related)
4.fitcenter:fitcenter and Fitstart are basically the same, the only difference is Fitcenter
The picture is scaled and then centered
5.fitend:fitend and Fitstart are basically the same,
The only difference is that fitend the picture proportionally to the right or the bottom display
6.center
Center indicates that the original image is centered as it was originally, if the original size
More than the size of the ImageView, then trim off the extra parts,
Show only the middle part of the image
The goal of 7.centercrop:centercrop is to fill the ImageView
Therefore, the original image is scaled proportionally so that the imageview can be filled
Cut out the extra width or height at the same time
The goal of 8.centerinside:centerinside is to display the original image in its entirety,
Therefore, the original image is scaled proportionally so that ImageView can display the original image in full
http://blog.csdn.net/u012702547/article/details/50586946
Qianfeng-android-day02-relativelayout layout, TextView, EditText, ImageView Basic Learning