Tutorial from google android "HelloTabWidget" has a null pointer error
When I view the following xml file in the layout view (eclispse), I got NullPointerException:null message, but when I run the code, it works, can anyone explain this to me why?
<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开发者_如何学运维>
The problem is just that the Eclipse Layout view does not support TabHost controls yet.
精彩评论