I want to have a listview containing some content. And below it, when you scroll to the buttom of the listview, a new header would be displayed followed with a new list view. Is is possible?
//Edit
The two listview need to have differet layout xml.
Have tried to put the second listview in a the footview of the first. But then the second listview is to small.
Here is my layout
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_height="fill_parent">
<LinearLayout android:id="@+id/header"
android:background="@drawable/app_topbar" android:layout_width="fill_parent"
android:orientation="horizontal" android:layout_height="wrap_content"
android:layout_alignParentTop="true">
<TextView android:text="@string/headline_notused"
android:gravity="center" android:textSize="24sp" android:textStyle="bold"
android:textColor="@color/txtcolor" android:layout_width="fill_parent"
android:layout_height="fill_parent"></TextView>
</LinearLayout>
<ProgressBar android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_below="@+id/header"
android:visibility="gone" style="?android:attr/progressBarStyleHorizontal"
android:id="@+id/progressbarHorizontal" />
<ListView android:id="@+id/notUsedList" android:divider="@android:color/transparent"
android:dividerHeight="5dip" android:layout_height="wrap_content"
android:layout_marginBottom="5dip" android:layout_width="fill_parent"
android:layout_weight="1"
android:layout_below="@+id/progressbarHorizontal"></ListView>
<LinearLayout android:orientation="vertical"
android:layout_below="@+id/notUsedList" android:background="@drawable/app_background"
android:layout_marginBottom="55dip" android:layout_width="fill_parent"
android:layout_height="fill_parent">
<LinearLayout android:id="@+id/myUsedHeader"
android:background="@drawable/app_topbar" android:layout_marginTop="10dip"
android:layout_width="fill_parent" android:orientation="horizontal"
android:layout_height="wrap_content" android:layout_alignParentTop="true">
<TextView android:text="@string/headline_used" android:gravity="center"
android:textSize="24sp" android:textStyle="bold" android:textColor="@color/txtcolor"
android:layout_width="fill_parent" android:layout_height="fill_parent"></TextView>
</LinearLayout>
<ListView android:id="@+id/usedList"
android:divider="@android:color/transparent" android:dividerHeight="5dip"
android:layout_height="fill_parent" android:layout_width="fill_parent"></ListView>
</LinearLayout>
</RelativeLayout>
You mean listview with different sections and each sections having a header. Try this link Jeff sharkey adapter