Some important properties to use with RelativeLayout:

Type 1: The property value is true or false

Android :layout_centerHrizontal horizontally centered Android :layout_centerVertical vertically centered Android :layout_centerInparent fully centered relative to the parent element Android :layout_alignParentBottom Attaches the lower edge of the parent element android:layout_alignParentLeft attaches the left edge of the parent element Android :layout_alignParentRight Attach to the right edge of the parent android:layout_alignParentTop Attach to the top edge of the parent Android :layout_alignWithParentIfMissing Use the parent element as a reference if the sibling element cannot be found

** Category 2: Attribute value must be the id reference name “@id/id-name” ** Android :layout_below Below an element Android :layout_above above an element Android :layout_toLeftOf is to the left of an element Android :layout_toRightOf to the right of an element Android :layout_alignTop The top edge of this element is aligned with the top edge of an element Android :layout_alignLeft The left edge of this element is aligned with the left edge of an element Android :layout_alignBottom The bottom edge of this element is aligned with the bottom edge of an element. Android :layout_alignRight The right edge of this element is aligned with the right edge of an element

The third type: attribute values are specific pixel values, such as 30DIP and 40px

Android :layout_marginBottom Distance from the bottom edge of an element Android :layout_marginLeft distance from the left edge of an element Android :layout_marginRight distance from the right edge of an element Android :layout_marginTop Distance from the upper edge of an element

The EditText android: hint

Sets the prompt in the input box when EditText is empty.

android:gravity

The Android: Gravity property defines the content of the view. For example, the text on a button. You can set the text to the left, right, and so on in the view. Gravity =”right” android: Gravity =”right” android: Gravity =”right

android:layout_gravity

Android :layout_gravity is used to set the position of the view relative to the parent view. For example, if you want to put a button in a linearLayout, you can use this property to set the button to the left or right. In the case of button, android:layout_gravity=”right” means button is to the right

android:layout_alignParentRight

Aligns the right end of the current control with the right end of the parent control. The value can only be true or false, the default is false.

The android: scaleType:

Android :scaleType is the size that controls how images resized/moved to ImageView. Imageview. ScaleType/android: ScaleType = imageView. ScaleType

CENTER/CENTER displays the image in the CENTER according to the original size. When the length/width of the image exceeds the length/width of the View, the CENTER part of the image is captured and displayed

CENTER_CROP/centerCrop Scale up the size of the image so that the length (width) of the image is equal to or greater than the length (width) of the View

CENTER_INSIDE/centerInside Displays the entire content of the image in the center, with the length/width of the image equal to or less than the length/width of the View by scaling down or reducing the original size

FIT_CENTER/fitCenter Scale up/down the image to the width of the View and center it

FIT_END/fitEnd Scale up/down the image to the width of the View and display it at the bottom of the View

FIT_START/fitStart Scale the image to the width of the View and display it in the upper part of the View

FIT_XY/fitXY displays images that are not scaled up/down to the size of View

MATRIX/MATRIX with MATRIX to draw, dynamic zoom out pictures to display.

Note that image names in the Drawable folder cannot be capitalized.