Frame layout in android provides a way to place the child views in a stack. The view that’s added last is on the top. The frame layout sizes itself according to the size of its largest child(with padding). You can control a child’s position within the frame layout by assigning gravity to the child using the android:layout_gravity attribute.
Read here (With Code) - https://developerxon.wordpress.com/20...