I try to arrange two buttons (with images on them which work fine) next to each other and to center them horizontally. That\'s what I have so far:
Attributes named android:layout_foo are LayoutParams - arguments to the View's parent. Try setting android:gravity="center" on the LinearLayout instead of android:layout_gravity. One affects how the LinearLayout will lay out its children within itself, the other affects how the LinearLayout's parent should treat it. You want the former.