<TabHost android:id="@+id/tabhost" android:layout_width="match_parent" android:layout_height="match_parent" > <LinearLayout android:id="@+id/LinearLayout1" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="horizontal" android:padding="3dp" > <TabWidget android:id="@android:id/tabs" android:layout_width="fill_parent" android:layout_height="wrap_content" android:removed="#0022FF" > </TabWidget> <FrameLayout android:id="@android:id/tabcontent" android:layout_width="fill_parent" android:layout_height="fill_parent"> <LinearLayout android:id="@+id/tab1" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="horizontal" > </LinearLayout> <LinearLayout android:id="@+id/tab2" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="horizontal" > </LinearLayout> <LinearLayout android:id="@+id/tab3" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="horizontal" > </LinearLayout> </FrameLayout> </LinearLayout> </TabHost> and java code: tabHost = (TabHost) findViewById(R.id.tabhost); tabHost.setup(); tabSpec = tabHost.newTabSpec("tag1"); tabSpec.setContent(R.id.tab1); tabSpec.setIndicator("Tab 1"); tabHost.addTab(tabSpec); tabSpec = tabHost.newTabSpec("tag2"); tabSpec.setContent(R.id.tab2); tabSpec.setIndicator("Tab 2"); tabHost.addTab(tabSpec); tabSpec = tabHost.newTabSpec("tag3"); tabSpec.setContent(R.id.tab3); tabSpec.setIndicator("Tab 3"); tabHost.addTab(tabSpec);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)