0

当我在布局视图 (eclispse) 中查看以下 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 回答