The easiest way I found is to set your target build API to 11 (Android 3.0)
and change your graphical layout view to Android 3.0 while you are working
with the tab xml file.  It's a bug that is supposed to be fixed for the
older versions but they haven't had to time yet.

On Sun, Jun 19, 2011 at 12:44 PM, Simon Platten <
[email protected]> wrote:

> I am trying to create a layout using the TabHost and TabWidge views as
> described here:
>
> http://developer.android.com/resources/tutorials/views/hello-tabwidget.html
>
> My XML so far looks like this:
>
> <?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 xmlns:android="
> http://schemas.android.com/apk/res/android";
>                   android:orientation="vertical"
>                   android:isScrollContainer="true"
>                   android:layout_width="fill_parent"
>                   android:layout_height="fill_parent"
>                       android:layout_gravity="center_horizontal"
>                     android:gravity="center_horizontal"
>                     android:background="@drawable/bg">
>         <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>
>
> However, the graphical layout shows the following error:
>
> Error during post inflation process:
> TabHost requires a TabWidget with id "android:id/tabs".
> View found with id 'tabs' is 'com.android.layoutlib.bridge.MockView'
>
> The following classes could not be found:
> - TabWidget
>
> I've made sure eclipse and the SDK is all up to date, so what am I missing?
>
> Thank you,
>
> --
> Regards,
> Sy
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to