title: Android displaying text when ListView is empty
body: <p>I'm setting a <code>TextView</code> with the id <code>@android:id/empty</code> to display a message when there are no items in the <code>ListView</code>. However, this <code>TextView</code> gets displayed even if there are items in the <code>ListView</code>, right before the items show up.</p>
  
  <p>How can I make it such that it only gets displayed when there are no elements in the <code>ListView</code>? </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:orientation="vertical" &gt;
  
  &lt;ListView
      android:id="@android:id/list"
      android:layout_width="wrap_content"
      android:layout_height="fill_parent"
      android:dividerHeight="1dp" &gt;
  &lt;/ListView&gt;
  
  &lt;TextView 
      android:id="@android:id/empty"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:text="@string/empty_list" /&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>PS: I'm using a <code>Loader</code> and a <code>SimpleCursorAdapter</code> with a <code>ListFragment</code>. </p>