0

I have the following layout:

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/commentView"
android:orientation="vertical"
android:background="@color/gray" >


<LinearLayout
    android:id="@+id/thumbnail"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_alignParentLeft="true"
    android:layout_below="@+id/relativeLayout1"
    android:background="@color/white"
    android:orientation="vertical" >

    <TextView
        android:id="@+id/title"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_margin="5dp"
        android:text="O descriere titlu"
        android:textAppearance="?android:attr/textAppearanceMedium" />

    <ImageView
        android:id="@+id/list_image"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_margin="5dp"
        android:adjustViewBounds="true"
        android:src="@drawable/lion" />
</LinearLayout>

<ListView
    android:id="@+id/commentList"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:layout_alignParentLeft="true"
    android:layout_below="@+id/thumbnail"
    android:divider="#b5b5b5"
    android:dividerHeight="1dp"
    android:listSelector="@drawable/list_selector" >

</ListView>

In the linear layout I load a half a screen picture and I populate the list view with some textViews. I would like to scroll the entire page, including the picture when I scroll through the listView. What I mean is that I want the list view expand on the entire screen if I scroll enough. Currently the image stays always in the same place and the listview is scrollable on half of the screen.

exilonX
  • 1,712
  • 3
  • 26
  • 50

1 Answers1

0

You can include the half-screen picture inside the ListView by overriding getViewTypeCount and getItemViewType together to load the appropriate content based on the Object type in your underlying list of data.

stkent
  • 19,772
  • 14
  • 85
  • 111
  • 1
    http://stackoverflow.com/questions/5300962/getviewtypecount-and-getitemviewtype-methods-of-arrayadapter – exilonX Sep 30 '14 at 20:32