0

I am using grid view for display images,so i want to add two buttons at the end of my gridview. I have tried merge, nested layout, different layouts, but nothing seems to work!

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingBottom="10dp"
    android:background="#F0F0F0"
        tools:context=".MainActivity">
    <ImageView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:padding="20dp"
        android:background="#CE051F"
        android:id="@+id/textView"
        android:layout_alignParentLeft="true"
        android:layout_alignParentStart="true"
        android:layout_gravity="top" />


    <GridView
        android:id="@+id/gridView"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:columnWidth="80dp"
        android:gravity="center"
        android:numColumns="2"
        android:paddingTop="40dp"
        android:paddingLeft="20dp"
        android:paddingRight="10dp"
        android:verticalSpacing="20dp"
        android:horizontalSpacing="20dp"
        android:stretchMode="columnWidth"
        android:layout_alignParentLeft="true"
        android:layout_alignParentStart="true"
        android:layout_gravity="center"
        android:layout_below="@+id/textView">
    </GridView>

</RelativeLayout>
dasdingonesin
  • 1,347
  • 1
  • 10
  • 16

1 Answers1

0
   <include
        android:id="@+id/tabs"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        layout="@layout/tabs_items" />

Adding this within linearLayout below gridview made it work!!