How do I emulate the behavior of @android:id/empty in an Activity that is not a ListActivity?
<p>According to the <a href="http://developer.android.com/reference/android/app/ListActivity.html" rel="nofollow"><code>ListActivity</code> documentation</a>, when <code>@android:id/empty</code> is defined, it will show a message instead of a <code>ListView</code> indicating that there is no data in the list. My Activity subclasses a custom Activity that I wrote, so it cannot simply subclass a ListActivity on its own. </p>

<p>I have attempted to do this in xml to try to emulate this behavior. Here is my current layout:</p>

<pre><code>&lt;LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"&gt;

    &lt;TextView 
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentTop="true"
        android:text="@string/titleReviewData"
        android:gravity="center" android:textSize="24sp"
        android:layout_margin="10dp" /&gt;

    &lt;ListView android:id="@+id/reviewList"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:layout_weight="2" /&gt;

    &lt;TextView android:id="@android:id/empty"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:layout_weight="1"
        android:text="No data" /&gt;

    &lt;Button android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_weight="0"
        android:text="@string/textReviseButton"
        android:onClick="revise" /&gt;
    &lt;Button android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_weight="0"
        android:text="@string/textSubmitButton"
        android:onClick="submit" /&gt;

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

<p>The layout is supposed to show a <code>TextView</code> title, the <code>ListView</code> or empty message under it, and two buttons stuck to the bottom of the layout. Unfortunately, the addition of the empty message is not rendered properly.</p>

<p>The only code I have in the corresponding Activity at the moment is code that sets an adapter for <code>@id/reviewList</code> and lots of code to open dialog boxes. How do I do this?</p>
