android center elements in linearlayout code example
Example 1: linear layout element to center
android:gravity="center"
Example 2: how to center all elements in a linearlayout
android:gravity takes care of its children,
android:layout_gravity takes care of itself