How to make android:layout_gravity="bottom|center_horizontal" stays at bottom
<p>I have a vertical LinearLayout which has a list view and one ImageView at the bottom and one at top and the list view filled up the space left behind.</p>

<p>It looks like this:</p>

<pre><code>&lt;LinearLayout layout_height="match_parent" layout_width="@dimen/width"
    orientation="vertical"&gt; 
    &lt;ImageView layout_height="@dimen/width" layout_width="@dimen/width" id="@+id/top"&gt;

     &lt;ListView  android:layout_height="0px"
        android:background="#00ffff"
        android:layout_width="@dimen/width"
        android:layout_weight="1" /&gt;

     &lt;ImageView layout_height="@dimen/width" layout_width="@dimen/width" id="@+id/bottom" layout_gravity="bottom|center_horizontal"&gt;
</code></pre>

<p>It works fine whenever I have the list view visible.</p>

<p>But whenever I set the ListView to visibility gone, the 'bottom' ImageView will popup to be just underneath the top Image View. </p>

<p>My question is why the bottom ImageView does not stay at the bottom despite I said ' android:layout_gravity="bottom|center_horizontal"' I have looked at hierarchyViewer, the height of the parent does match the screen's height. So the bottom Image view should honor the   android:layout_gravity="bottom|center_horizontal" and stay at the bottom, right?</p>
