0

レイアウト ビュー (eclipse) で次の xml ファイルを表示すると、NullPointerException:null メッセージが表示されますが、コードを実行すると動作します。

<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"
                    android:padding="5dp">
        <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="fill_parent"
            android:padding="5dp"/>
        </LinearLayout>     
</TabHost>
4

1 に答える 1

0

問題は、EclipseレイアウトビューがまだTabHostコントロールをサポートしていないことです。

于 2010-09-11T17:53:51.570 に答える