As mentioned in the Introduction section, RelativeLayout allows Views to be position-relative to each other and the parent. RelativeLayout is particularly useful for reducing the number of nested layouts, which is very important for reducing memory and processing requirements.
Using RelativeLayout
Getting ready
Create a new project and call it RelativeLayout. Android Studio defaults to using a ConstraintLayout , which we will replace with a RelativeLayout for this example. Use the default Phone & Tablet settings on the Target Android devices and select Empty Activity on the Add an Activity to Mobile dialog.