Android empty list layout
Whatever I do, I can't get the empty tag to display. Inside my tabs, I've got:
<LinearLayout
android:id="@+id/thisParticularTab"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<TextView android:id="@+id/LastUpdated"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="List last updated: N/A" />
<ListView
android:id="@+id/mySpecialListView"
android:layout_width="fill_parent"
android:layout_height="fill_parent" />
<Button id="@android:id/empty"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:text="Click to fill the list" /></LinearLayout>
However despite my ListView being empty (no items are displayed, and the database table being read from is empty), the button is not displayed. Any ideas?
Also, when it appears, will I be able to refer to R.id.empty? Does this really mean I can only have 1 ListView/empty per activity? My understanding is that 'id' is used to define UI define; how can I give it a name and also assign it as the empty View within the XML? (I'd prefer not to use setEmptyView())