Anyone Know What This Error Mean For Android Tabs?
I am trying to try out the tutorial online and wanted to put the tab to the layout xml. I have change the extends from Activity to TabActivity. In the design view of the layout xml
Solution 1:
Known bug http://code.google.com/p/android/issues/detail?id=13092
A user suggested to switch build target to 1.6 and the issue goes away. Obviously a temporary fix.
Solution 2:
You need a layout 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
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>
See the Tab Layout tutorial for more info.
Solution 3:
Do you have a TabWidget with id android:id/tabs as the error message tells you you need?
Solution 4:
Switch to android Target 3.0 or 3.1. You can find that drop down list on the top right side
Solution 5:
I had the same issue. The workaround is detailed in this link:
Comment 63 by blundell...@gmail.com, May 5, 2011
As stated above Quick Fix: Just change the API Target (top left of XML graphical view) to 3.0 and you can see it
Post a Comment for "Anyone Know What This Error Mean For Android Tabs?"