I know we can set the following values to the android:gravity and android:layout_gravity properties:
android:gravity
android:layout_gravity
The android:gravity sets the gravity (position) of the children whereas the android:layout_gravity sets the position of the view itself. Hope it helps