I have created one scroll view with two list Fragments here is the code:
<?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="wrap_content"
android:background="@drawable/blue_shade_top_gainers_and_loosers"
android:orientation="vertical" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:paddingBottom="1dip"
android:paddingLeft="1dip"
android:paddingRight="1dip"
android:paddingTop="2dip" >
<fragment
android:id="@+id/header_fragment"
android:name="com.lk.ignitionit.cse.util.HeaderFragmentActivity"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>
<ScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/ScrollView13"
android:layout_width="fill_parent"
android:layout_height="match_parent" >
<RelativeLayout
android:id="@+id/rl_top"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_marginBottom="1dip"
android:layout_marginLeft="1dip"
android:layout_marginRight="1dip"
android:layout_marginTop="1dip"
>
<LinearLayout
android:id="@+id/headg"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:scrollbars="vertical" >
<include layout="@layout/top_gainer_header" />
</LinearLayout>
<fragment
android:id="@+id/gain"
android:name="com.lk.ignitionit.cse.application.TopGainersFragmentActivity"
android:layout_width="match_parent"
**android:layout_height="wrap_content"**
android:layout_below="@+id/headg" />
<LinearLayout
android:id="@+id/headl"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/gain" >
<include layout="@layout/top_loosers_header" />
</LinearLayout>
<fragment
android:name="com.lk.ignitionit.cse.application.TopLoosersFragmantActivity"
android:layout_width="match_parent"
**android:layout_height="wrap_content"**
android:layout_below="@+id/headl" />
</RelativeLayout>
</ScrollView>
</LinearLayout>
but the out put is not show the entire list
then i change the fragment layout height into 240dip instead of "wrap_content" now it's enough to show entire list. but the thing is, those data is dynamic and each list fragment have 10 list items.so i can't predict the the fragment height. if the names are long, this height is not enough.
so i need to set fragment height as wrap_content and scroll able. how can i do this?