Hi boy. I have TabActivity as the following simple code.
public class TabhostActivity extends Activity{ TabHost host; public class TabhostActivity extends Activity{ TabHost host; @Override protected void onCreate(Bundle savedInstanceState) {
and has a simple tab format like
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" > <TabHost android:id="@+id/mytabhost" android:layout_width="match_parent" android:layout_height="match_parent" android:padding="5dp"> <LinearLayout android:id="@+id/linearLayout1" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" android:padding="5dp"> <FrameLayout android:id="@android:id/tabcontent" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_weight="1" android:background="#FF0000"> </FrameLayout> <HorizontalScrollView android:id="@+id/horizontalScrollView1" android:layout_width="fill_parent" android:layout_height="wrap_content" > <TabWidget android:layout_marginLeft="5dp" android:id="@android:id/tabs" android:layout_width="wrap_content" android:layout_height="wrap_content" android:tabStripEnabled="true" > </TabWidget> </HorizontalScrollView> </LinearLayout> </TabHost> </LinearLayout>
So please help me, where is the code getting wrong? I got an exception like
02-23 14: 09: 47.920: E / AndroidRuntime (1000): caused by: java.lang.IllegalStateException: did you forget to call "public void setup (LocalActivityManager activityGroup)"?
source share