<!--a single control is often used
android:id--specify the appropriate ID for the control
android:text--Specifies the text that is displayed in the control, it is important to note that the string in the Strings.xml file is used as much as possible.
android:grivity--the base position of the specified control, such as center, right, etc position
android:textsize--Specifies the size of the font in the control
android:background--Specifies the background color used by the control, and the RGB naming method
android:width--the width of the specified control
android:height--the height of the specified control
android:padding*--Specifies the padding for the control, meaning that the contents of the control
android:sigleline--if set to True, the contents of the control are displayed in the same profession
-
<!--is often used relative to layout
Android:layout_above the bottom of the control to the control of the given ID
Android:layout_below the top of the control to the control of the given ID
Android:layout_toleftof aligns the right edge of the control with the left edge of the control for the given ID
Android:layout_torightof aligns the left edge of the control with the right edge of the control for the given ID
Android:layout_alignbaseline the baseline of the control's baseline and the given ID of the control
Android:layout_alignbottom aligns the bottom edge of the control with the bottom edge of the given ID control
Android:layout_alignleft aligns the left edge of the control with the left edge of the given ID control
Android:layout_alignright aligns the right edge of the control with the right edge of the given ID control
Android:layout_aligntop aligns the top edge of the given control with the top of the given ID control
Android:alignparentbottom if the value is true, align the bottom of the control with the bottom of the parent control
Android:layout_alignparentleft if the value is true, align the left side of the control with the left side of the parent control
Android:layout_alignparentright if the value is true, align the right side of the control with the right side of the parent control
Android:layout_alignparenttop if the value is true, aligns the top of the space with the top of the parent control
Android:layout_centerhorizontal if the value is true, the control will be in the horizontal direction of the central
Android:layout_centerinparent if the value is true, the control will be centered on the horizontal and vertical direction of the parent control
Android:layout_centervertical if the value is true, the control will be in the vertical direction of the Central
-
Extended Knowledge:
EditText's Android:hint
Sets the prompt information in the input box when EditText is empty.
android:gravity
The Android:gravity property is the qualification for the view content. For example, a button above the text. You can set the text on the left side of the view, on the right, and so on. Take the button as an example, android:gravity= "right" then the text on the button
android:layout_gravity
Android:layout_gravity is used to set the position of the view relative to the parent view. For example, a button in the LinearLayout, you want to put the button on the left, right and other positions can be set by this property. Take button For example, android:layout_gravity= "right" button on
Android:layout_alignparentright
Aligns the right end of the current control with the right end of the parent control. This property value can only be true or FALSE, which is false by default.
Android:scaletype:
Android:scaletype is a size that controls how the picture resized/moved to the ImageView. The meaning difference of Imageview.scaletype/android:scaletype value:
Center/center is centered on the original size of the image, and when the picture is longer/wider than the length/width of the view, the center portion of the image is displayed
Center_crop/centercrop proportionally enlarges the size of the image so that the image is long (wide) equal to or greater than the length (width) of the view
Center_inside/centerinside Displays the contents of the picture in full, by scaling it down or the original size to make the picture long/wide equal to or less than the length/width of the view
Fit_center/fitcenter enlarge/Shrink the picture to the width of the view, centered on the display
Fit_end/fitend Zoom in/out to the width of the view, displayed in the lower part of the view
Fit_start/fitstart enlarge/Shrink the image to the width of the view, displayed in the upper part of the view
Fit_xy/fitxy The picture is not scaled up/down to the view size display
The Matrix/matrix is drawn with a matrix and is displayed by zooming in and out of the image.
Note that the name of the image in the Drawable folder cannot be capitalized.
Android Control Layout Common Properties