Design + Code an Android App from Scratch
This video shows another layout called RelativeLayout in action. This layout stacks items on top of each other by default. We can specify whether the View should stick to the left, right, top, bottom of the parent ViewGroup inside which it is contained or whether it should be centred horizontally or vertically with respect to the ViewGroup. The View can also specify a combination of the attributes and its size may be modified to respect the constraints in that case. The RelativeLayout also lets you specify placement of Views with respect to each other and provides options where a View can be placed above, below or beside another View and can start or end to imitate the other View’s bounds.