
I am not able to make the upper view scroll with listview. The top view has clickable elements. The top view has different elements like image,text1,text2,table. The bottom layout has ListView. The whole view is wrapped inside Relative Layout.

I am not able to make the upper view scroll with listview. The top view has clickable elements. The top view has different elements like image,text1,text2,table. The bottom layout has ListView. The whole view is wrapped inside Relative Layout.
 
    
    Here is what I did . Hope it helps others who trip on this stuff.
main_layout.xml (this is encapsulated inside relative layout)
<ListView
    android:id="@+id/comments_list"
    android:layout_width="wrap_content"
    android:layout_height="fill_parent"
    android:layout_above="@+id/comments_editText"
    android:layout_marginLeft="0dp"
    android:layout_marginRight="0dp"
    android:scrollbarStyle="outsideInset"
    android:cacheColorHint="#00000000"
    android:divider="@color/background_color"
    android:dividerHeight="1dp" />
<EditText
    android:imeOptions="normal"
    android:inputType="text"
    android:id="@+id/comments_editText"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:layout_alignParentBottom="true"
    android:layout_margin="6dp"
    android:text="@string/write_comment" />
Then I created a headerview.xml (encapsulated inside linear layout with android:layout_width="wrap_content" android:layout_height="wrap_content" )
<My_Custom_view>
    android:id="@+id/comments_info"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content" />
<TextView
    android:id="@+id/comments_likeText"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:layout_marginBottom="2dp"
    android:paddingTop="1dp"
    android:paddingLeft="10dp"
    android:scaleType="centerInside"
    android:drawableLeft="@drawable/like_icon"
    android:drawablePadding="4dp"
    android:textColor="@color/dark_blue_text_color"
    android:visibility="gone" />
And then to on my Listfragmet (or listview) I did this
View listHead = LayoutInflater.from(getActivity()).inflate(R.layout.headerview, null);
commentsListView = (ListView)root.findViewById(R.id.comments_list);
commentsListView.addHeaderView(listHead);
 
    
    Use scroll view. Put list view inside scroll view and it should be scrollable. ps. as stated before, list view should have some kind of default scrolling but it haven't worked for me always.
