How to make listview and GridLayout scrollable

android, android-listview, listview, scrollable

Solution

  Adding gridlayout to header of listview resolved my issue

Problem

This is my layout file.My gridlayout is fixed only my listview is scrollable.I have tried to set gridlayout as listview header but then there are two gridlayouts.please tell what am I doing wrong.I want whole layout scrollable including listview below it. ``` <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_gravity="center_vertical" android:gravity="center_vertical" > <LinearLayout android:id="@+id/layoutid" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_centerHorizontal="true" android:orientation="vertical"> <GridLayout android:layout_width="wrap_content" android:layout_height="fill_parent" android:columnCount="8" android:rowCount="7" android:layout_gravity="center_horizontal" > <TextView android:id="@+id/terminaterf" android:layout_width="80dip" android:layout_height="70dip" android:layout_columnSpan="2" android:layout_rowSpan="1" android:background="#FF4981" android:textColor="#FFFFFF" android:gravity="center" android:clickable="true" android:textSize="13sp" /> </GridLayout > <include android:layout_width="fill_parent" android:layout_height="fill_parent" layout="@layout/my_listview" android:layout_gravity="center_vertical"/> </LinearLayout> </RelativeLayout> ```

Original source