I guess the title says it all. What is the difference between the two (if there is one) XML attributes and when would one be better used over the other?
...
android:layout_gravity="center_vertical"
...
and
...
android:layout_centerVertical="true"
...
Well, layout_centerVertical is only valid for RelativeLayouts. Gravity is also valid for linear layouts, so you could tell a LL with horizontal orientation to center objects vertically that otherwise would be top or bottom aligned.