4

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>
Tushar189
  • 246
  • 1
  • 11
  • add scrollview as your root container bear in mind nesting scrollview is not a good idea – Illegal Argument May 24 '14 at 11:54
  • You should set that gridlayout as a header view of your listview. I didn't understand why you had 2 gridlayouts when you did so,maybe you have a wrong implementation there. – Devrim May 24 '14 at 12:06

1 Answers1

4
  Adding gridlayout to header of listview resolved my issue
Tushar189
  • 246
  • 1
  • 11