Here you can see I’ve got the LL_BtnR layout inside the longer linearLayout3.
LL_BtnR’s gravity is set to ‘center’, yet no matter what, it appears in the left corner.
Any ideas what to do to get the content of linearLayout3 centers?

Thanks!
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout android:id="@+id/linearLayout1" android:layout_width="fill_parent" android:layout_height="fill_parent" xmlns:android="http://schemas.android.com/apk/res/android" android:background="@layout/backrep" android:orientation="vertical" android:layout_gravity="center">
<LinearLayout android:layout_height="wrap_content" android:layout_width="match_parent" android:id="@+id/linearLayout2" android:background="@drawable/spell_frame" android:layout_marginBottom="10px" android:layout_marginTop="5px" android:layout_gravity="center">
<TextView android:text="TextView" android:textColor="#FFFFFF" android:id="@+id/textView1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:paddingTop="7px" android:paddingLeft="15px" android:typeface="sans"></TextView>
</LinearLayout>
<LinearLayout android:layout_height="wrap_content" android:layout_width="match_parent" android:id="@+id/linearLayout3" android:layout_marginLeft="5px" android:layout_marginRight="5px" android:layout_gravity="center">
<LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="5px" android:layout_marginBottom="5px" android:layout_marginRight="5px" android:layout_marginTop="5px" android:id="@+id/LL_BtnR" android:onClick="onButtonClick" android:layout_gravity="center">
<ImageView android:layout_height="wrap_content" android:id="@+id/ImageView01" android:src="@drawable/button_left" android:layout_width="wrap_content"></ImageView>
<FrameLayout android:id="@+id/frameLayout1" android:layout_height="match_parent" android:background="@layout/butrep" android:layout_width="40px" android:layout_gravity="center">
<ImageView android:layout_height="wrap_content" android:layout_width="wrap_content" android:src="@drawable/bun_r" android:id="@+id/imageView2" android:layout_gravity="center"></ImageView>
</FrameLayout>
<ImageView android:layout_height="wrap_content" android:id="@+id/imageView1" android:layout_width="wrap_content" android:src="@drawable/button_right"></ImageView>
</LinearLayout>
</LinearLayout>
</LinearLayout>
Change the gravity for the enclosing LinearLayout to center.