I\'ve looked through numerous similar questions here at SO, but nothing helps.
I have a hierarchy of different nested layouts, all have android:layout_width=\"fill_par
These two attributes are commonly confused:
android:gravity sets the gravity of the content of the View it's
used on. android:layout_gravity sets the gravity of the View or
Layout relative to its parent.So either put android:gravity="center" on the parent or android:layout_gravity="center" on the LinearLayout itself.
I have caught myself a number of times mixing them up and wondering why things weren't centering properly...