I know we can set the following values to the android:gravity and android:layout_gravity properties:
android:gravity
android:layout_gravity
If a we want to set the gravity of content inside a view then we will use "android:gravity", and if we want to set the gravity of this view (as a whole) within its parent view then we will use "android:layout_gravity".