如何在tabhost創建多個tabwidget,我得到空指針異常,當我這樣做多TabWidget?
<?xml version="1.0" encoding="utf-8"?>
<TabHost xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/tabhost" android:layout_width="fill_parent"
android:layout_height="fill_parent">
<LinearLayout android:orientation="vertical"
android:layout_width="fill_parent" android:layout_height="fill_parent">
<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="0dip"
android:layout_weight="1" />
<TabWidget android:id="@android:id/tabs"
android:layout_width="fill_parent" android:layout_height="wrap_content" />
</LinearLayout>
</TabHost>
我試圖添加多則tabspec,但我得到了一個錯誤,可以請你給我一個簡單的〔實施例 – insatien
的我發佈的鏈接是一個簡單的例子。 – C0deAttack
我已經看到了這個例子,它是有幫助的,但它只創建一個tabhost,我想有兩個tabhost一個在頂部和一個在buttom中操縱相同的FrameLayout – insatien