Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!--
- Blog Post:
- http://devleader.ca/2013/11/04/fragments-tabbed-android-user-interface
- Layouts:
- activity_main.xml: http://pastebin.com/kj8M38Ze
- fragment_tabs.xml: http://pastebin.com/0b7HAeAK
- simple_tab.xml: http://pastebin.com/9SqLbS0X
- Classes:
- MainActivity.java: http://pastebin.com/eBv3H775
- SimpleTabDefinition.java: http://pastebin.com/wW3WCcy9
- TabDefinition.java: http://pastebin.com/KSRV2f3U
- TabsFragment.java: http://pastebin.com/9Asv7AVH
- -->
- <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"
- android:background="#EFEFEF">
- <LinearLayout
- android:orientation="vertical"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent">
- <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">
- <FrameLayout
- android:id="@+id/tab1"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:background="#FFFF00" />
- <FrameLayout
- android:id="@+id/tab2"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:background="#FF00FF" />
- </FrameLayout>
- </LinearLayout>
- </TabHost>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement