ScrollView in tabhost xml - android



I want to be able to scroll within each screen in my android application. when you scroll I want the tab bar to scroll as well. My code works..However when you go to the screen with the tab bar, the tab bar is not visible..to see the tab bar you have to scroll up. Is there any way for the tab bar to be visible by default? thanks


My tab_host.xml code



<?xml version="1.0" encoding="utf-8"?>

<TabHost xmlns:android="http://ift.tt/nIICcg"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@android:id/tabhost">

<ScrollView
android:layout_height="fill_parent"
android:layout_width="fill_parent" >
<LinearLayout
android:id="@+id/LinearLayout01"
android:orientation="vertical"
android:layout_height="fill_parent"
android:layout_width="fill_parent">

<TabWidget
android:id="@android:id/tabs"
android:layout_height="wrap_content"
android:layout_width="fill_parent">
</TabWidget>

<FrameLayout
android:id="@android:id/tabcontent"
android:layout_height="fill_parent"
android:layout_width="fill_parent">
</FrameLayout>

</LinearLayout>

No comments:

Post a Comment