android:layout_gravity lets you say where you want views to appear in their available space.
android:layout_gravity deals with the placement of the view itself
whereas android:gravity controls how the view’s contents are displayed
Value | What it does |
top, bottom, left, right | Puts the view at the top,bottom,left, or right of its available space. |
start,end | Puts the view at the start or end of its available space. |
center | Centers the view vertically and horizontally in its available space. |
fill_vertical, fill_horizontal | Grows the view so that it fills its available space vertically or horizontally. |
fill | Grows the view so that it fills its available space vertically and horizontally. |