Skip to content

Instantly share code, notes, and snippets.

@Singhak
Created June 21, 2016 05:11
Show Gist options
  • Save Singhak/4edc86c8f4003687740205a522cbfa2f to your computer and use it in GitHub Desktop.
Save Singhak/4edc86c8f4003687740205a522cbfa2f to your computer and use it in GitHub Desktop.
This is use to host fragment
<android.support.v4.app.FragmentTabHost
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/tabhost"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TabWidget
android:id="@android:id/tabs"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="0"/>
<FrameLayout
android:id="@android:id/tabcontent"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_weight="0"/>
<FrameLayout
android:id="@+id/content"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"/>
</LinearLayout>
</android.support.v4.app.FragmentTabHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment