I know we can set the following values to the android:gravity and android:layout_gravity properties:
android:gravity
android:layout_gravity
The basic difference between the two is that-
android:gravity is used for child elements of the view.
android:layout_gravity is used for this element with respect to parent view.