I have read http://developer.android.com/resources/articles/layout-tricks-stubs.html which explains how to use a viewstub as a lazy include for layouts.
This works fine on a simple list view i have, but when I try to use it in my actual Tabbed layout, it disappears as soon as the tab gets any real content.
I have set all tabs, and tab host to use wrap_content as height (so as not to push the stub off)
Has anyone used stubs with a tabbed view? What is the trick?
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="fill_parent"
android:layout_height="fill_parent">
<TabHost android:id="@android:id/tabhost" android:layout_width="fill_parent"
android:layout_height="wrap_content">
<LinearLayout android:orientation="vertical"
android:layout_width="fill_parent" android:layout_height="wrap_content">
<TabWidget android:id="@android:id/tabs"
android:layout_width="fill_parent" android:layout_height="wrap_content" />
<FrameLayout android:id="@android:id/tabcontent"
android:layout_width="fill_parent" android:layout_height="wrap_content">
<ListView android:id="@+id/discqueue" android:layout_width="fill_parent"
android:layout_height="wrap_content" />
<ListView android:id="@+id/instantqueue"
android:layout_width="fill_parent" android:layout_height="wrap_content" />
</FrameLayout>
<ViewStub android:id="@+id/stub_navigate"
android:inflatedId="@+id/panel_navigate" android:layout="@layout/pagination_bar"
android:layout_width="fill_parent" android:layout_height="wrap_content"
android:layout_gravity="bottom" />
</LinearLayout>
</TabHost>
</LinearLayout>