I know we can set the following values to the android:gravity and android:layout_gravity properties:
android:gravity
android:layout_gravity
From what I can gather layout_gravity is the gravity of that view inside its parent, and gravity is the gravity of the children inside that view.
I think this is right but the best way to find out is to play around.