Whats wrong with this simple Layout?
<p>Im trying to define a LinearLayout which contains another LinearLayout which should always be desplayed in the horizontal and vertical center. An ImageView should be placed always vertically centered on the right side of the parent Layout:</p>

<blockquote>
<pre><code>                                 A                                           B
</code></pre>
</blockquote>

<p>I defined it the following:</p>

<pre><code>&lt;LinearLayout
    android:orientation="horizontal"
    android:layout_width="fill_parent"
    android:layout_height="60px"&gt;

     &lt;LinearLayout android:id="@+id/footer" android:orientation="horizontal" android:layout_height="50px" android:paddingTop="5px" android:layout_width="wrap_content" android:background="@drawable/footer_border" android:paddingRight="5px" android:paddingLeft="5px" android:layout_gravity="center_horizontal"&gt;
        &lt;ImageButton android:id="@+id/libraryButton" android:layout_height="wrap_content" android:src="@drawable/library_button" android:background="#000000" android:layout_width="wrap_content"/&gt;
        &lt;ImageButton android:id="@+id/bookButton" android:layout_height="wrap_content" android:src="@drawable/book_button" android:background="#000000" android:layout_width="wrap_content" android:paddingLeft="15px" android:paddingRight="15px"/&gt;
        &lt;ImageButton android:id="@+id/workspaceButton" android:layout_height="wrap_content" android:src="@drawable/workspace_button" android:background="#000000" android:layout_width="wrap_content"/&gt;
     &lt;/LinearLayout&gt;

     &lt;ImageView
     android:layout_width="wrap_content"
     android:layout_height="wrap_content"
     android:layout_gravity="right"
     android:id="@+id/loading"&gt;
     &lt;/ImageView&gt;

     &lt;/LinearLayout&gt; 
</code></pre>

<p>But unfornatuley its not working... The LinearLayout (A) and the ImageView (B) is on the left side.... But i set gravity to center and right?? Why?</p>
