Relative Layout is a view group that displays child views in relative positions.
RelativeLayout is a view group that displays child views in relative positions
It is used in android for custom layout designing. Relativeview gives us the ease to place our component/view based on the relative / sibling
component’s position.
We can use Above, Below, Left and Right in relative Layout to arrange the component’s position in with respect to other compnent.
There are different attributes of Relative layout.
1.above:
- alignBottom
- alignLeft
- alignRight
5.alignStart - alignTop
7.alignParentBottom - alignParentEnd
- alignParentLeft
- alignParentRight
9.centerVertical
LINEAR LAYOUT:
In a linear layout, all the elements are displayed in a linear style either vertically or horizontally.
Either Horizontally or Vertically this behavior is set in android:orientation which is an property of the node Linear Layout.