title: Weight specified ListView reduces in size when item is removed
body: <p>I'm working on a dialog box in android which I intend to make very flexible for different phone-resolutions. Therefore I'm using the layout_weight attribute when building the xml file.</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:id="@+id/newGame_linearLayout"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:orientation="vertical" &gt;
  
      &lt;LinearLayout
          android:layout_width="wrap_content"
          android:layout_height="0dp"
          android:layout_gravity="center_horizontal"
          android:layout_weight="3"
          android:orientation="horizontal" &gt;
  
          &lt;ListView
              android:id="@+id/newGame_InvitedPlayers"
              android:layout_width="0dp"
              android:layout_height="match_parent"
              android:layout_margin="5dp"
              android:layout_weight="1"
              android:background="@color/ListView_Background"
              android:cacheColorHint="#00000000" &gt;
          &lt;/ListView&gt;
  
          &lt;ListView
              android:id="@+id/newGame_Plugins"
              android:layout_width="0dp"
              android:layout_height="match_parent"
              android:layout_margin="5dp"
              android:layout_weight="1"
              android:background="@color/ListView_Background"
              android:cacheColorHint="#00000000" &gt;
          &lt;/ListView&gt;
      &lt;/LinearLayout&gt;
  
      &lt;Button
          android:id="@+id/newGame_sendInvite"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_gravity="center_horizontal"
          android:text="Invite Players" /&gt;
  
      &lt;TextView
          android:id="@+id/newGame_textViewOnlinePlayers"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_gravity="center_horizontal"
          android:text="Online Players:" /&gt;
  
      &lt;ListView
          android:id="@+id/newGame_onlinePlayers"
          android:layout_width="match_parent"
          android:layout_height="0dp"
          android:layout_margin="5dp"
          android:layout_weight="2"
          android:background="@color/ListView_Background"
          android:cacheColorHint="#00000000" &gt;
      &lt;/ListView&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>Here is how it's supposed to look: </p>
  
  <p><a href="https://junk.zomis.net/stackoverflow/withnames.png" rel="nofollow noreferrer"><img src="https://junk.zomis.net/stackoverflow/withnames.png" alt="desired outcome"></a> </p>
  
  <p>And indeed it looks like I want it to.</p>
  
  <p>But when I click the items in the bottom Listview, which removes them from the bottom ListView and adds them to the top left ListView, the bottom Listview decreases in size until I remove the very last item and it disappears completely and looks like this:</p>
  
  <p><a href="https://junk.zomis.net/stackoverflow/nonames.png" rel="nofollow noreferrer"><img src="https://junk.zomis.net/stackoverflow/nonames.png" alt="current outcome"></a> </p>
  
  <p>I want it to not change in size at all. Even when it's empty.</p>
  
  <p>Even though dp is a very flexible size-unit I don't want to use it in this case,
  the two top ListViews should take 3/5 of the screen and the bottom one gets the remaining 2/5, and the Button and the TextView should take as little space possible in between.</p>
  
  <p>I've tried change the last Listviews height to match_parent, it doesn't change anything. The listview still disappears when I click the items.</p>