title: GridView is Showing only one row
body: <p>I am having issue in showing the list items of the GridView in Android. It is showing only one row with two column. I know this is the issue of the layout but I am not able to figure out, where I am doing wrong?</p>
  
  <pre><code>  &lt;ScrollView
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:layout_above="@+id/hire_relative_contact_align_bottom"
              android:layout_below="@+id/book_homestay_image_linear"
              android:scrollbars="vertical"&gt;
  
              &lt;LinearLayout
                  android:id="@+id/linear_book_homestay_main_scrollable"
                  android:layout_width="match_parent"
                  android:layout_height="match_parent"
                  android:layout_alignParentLeft="true"
                  android:layout_alignParentStart="true"
                  android:layout_below="@+id/book_homestay_image_linear"
                  android:orientation="vertical"&gt;
  
                  &lt;LinearLayout
                      android:layout_width="match_parent"
                      android:layout_height="wrap_content"
                      android:layout_marginTop="10dp"
                      android:orientation="vertical"&gt;
  
                      &lt;TextView
                          android:layout_width="130dp"
                          android:layout_height="15dp"
                          android:layout_gravity="center"
                          android:background="#5EB6C2"
                          android:gravity="center"
                          android:text="Basic Detail"
                          android:textAllCaps="true"
                          android:textColor="#FFFFFF"
                          android:textSize="12sp" /&gt;
  
                      &lt;View
                          android:layout_width="200dp"
                          android:layout_height="1dp"
                          android:layout_gravity="center"
                          android:background="#5EB6C2" /&gt;
  
  
                      &lt;com.bluejamesbond.text.DocumentView
  
                          android:layout_width="match_parent"
                          android:layout_height="wrap_content"
                          android:layout_marginLeft="10dp"
                          android:layout_marginRight="10dp"
                          android:layout_marginTop="10dp"
                          app:documentView_textColor="#333"
                          app:documentView_textFormat="plain"
                          app:documentView_textSize="12sp"
                          ext:documentView_textAlignment="justified" /&gt;
  
  
                  &lt;/LinearLayout&gt;
  
  
                  &lt;LinearLayout
                      android:layout_width="match_parent"
                      android:layout_height="120dp"
                      android:layout_marginTop="10dp"
                      android:orientation="horizontal"&gt;
  
                      &lt;RelativeLayout
                          android:layout_width="0dp"
                          android:layout_height="match_parent"
                          android:layout_marginRight="4dp"
                          android:layout_weight="1"&gt;
  
                          &lt;ImageView
                              android:id="@+id/homestay_image_basic_detail"
                              android:layout_width="120dp"
                              android:layout_height="match_parent"
                              android:layout_alignParentRight="true"
                              android:scaleType="fitXY" /&gt;
  
  
                      &lt;/RelativeLayout&gt;
  
                      &lt;LinearLayout
                          android:layout_width="0dp"
                          android:layout_height="match_parent"
                          android:layout_marginLeft="4dp"
                          android:layout_weight="1"
                          android:orientation="vertical"&gt;
  
                          &lt;TextView
                              android:layout_width="match_parent"
                              android:layout_height="0dp"
                              android:layout_weight="1"
                              android:text="Host"
                              android:textAllCaps="false"
                              android:textColor="#555"
                              android:textSize="12sp"
                              android:textStyle="bold" /&gt;
  
                          &lt;TextView
                              android:id="@+id/homestay_textHost"
                              android:layout_width="match_parent"
                              android:layout_height="0dp"
                              android:layout_marginBottom="3dp"
                              android:layout_weight="1"
                              android:text=""
                              android:textAllCaps="true"
                              android:textColor="#555"
                              android:textSize="10sp"
                              android:textStyle="normal" /&gt;
  
  
                          &lt;TextView
                              android:id="@+id/textView3"
                              android:layout_width="match_parent"
                              android:layout_height="0dp"
                              android:layout_weight="1"
                              android:text="Address"
                              android:textAllCaps="false"
                              android:textColor="#555"
                              android:textSize="12sp"
                              android:textStyle="bold" /&gt;
  
                          &lt;TextView
                              android:id="@+id/homestay_textAddress"
                              android:layout_width="match_parent"
                              android:layout_height="0dp"
                              android:layout_marginBottom="3dp"
                              android:layout_weight="1"
                              android:text=""
                              android:textAllCaps="true"
                              android:textColor="#555"
                              android:textSize="10sp"
  
                              android:textStyle="normal" /&gt;
  
                          &lt;TextView
                              android:layout_width="match_parent"
                              android:layout_height="0dp"
                              android:layout_weight="1"
                              android:text="Phone"
                              android:textAllCaps="false"
                              android:textColor="#555"
                              android:textSize="12sp"
                              android:textStyle="bold" /&gt;
  
                          &lt;TextView
                              android:id="@+id/homestay_textPhone"
                              android:layout_width="match_parent"
                              android:layout_height="0dp"
                              android:layout_marginBottom="3dp"
                              android:layout_weight="1"
                              android:text=""
                              android:textAllCaps="true"
                              android:textColor="#555"
                              android:textSize="10sp"
                              android:textStyle="normal" /&gt;
  
                          &lt;TextView
                              android:layout_width="match_parent"
                              android:layout_height="0dp"
                              android:layout_weight="1"
                              android:text="Email"
                              android:textAllCaps="false"
                              android:textColor="#555"
                              android:textSize="12sp"
                              android:textStyle="bold" /&gt;
  
                          &lt;TextView
                              android:id="@+id/homestay_textEmail"
                              android:layout_width="match_parent"
                              android:layout_height="0dp"
                              android:layout_weight="1"
                              android:text=""
                              android:textAllCaps="true"
                              android:textColor="#555"
                              android:textSize="10sp"
                              android:textStyle="normal" /&gt;
  
  
                      &lt;/LinearLayout&gt;
  
                  &lt;/LinearLayout&gt;
  
                  &lt;LinearLayout
                      android:layout_width="match_parent"
                      android:layout_height="wrap_content"
                      android:layout_marginTop="10dp"
                      android:orientation="vertical"&gt;
  
                      &lt;TextView
                          android:layout_width="130dp"
                          android:layout_height="15dp"
                          android:layout_gravity="center"
                          android:background="#5EB6C2"
                          android:gravity="center"
                          android:text="Description"
                          android:textAllCaps="true"
                          android:textColor="#FFFFFF"
                          android:textSize="12sp" /&gt;
  
                      &lt;View
                          android:layout_width="200dp"
                          android:layout_height="1dp"
                          android:layout_gravity="center"
                          android:background="#5EB6C2" /&gt;
  
  
                      &lt;com.bluejamesbond.text.DocumentView
                          android:id="@+id/homestay_textDescriptionjustify"
                          android:layout_width="match_parent"
                          android:layout_height="wrap_content"
  
                          android:layout_marginLeft="10dp"
                          android:layout_marginRight="10dp"
                          android:layout_marginTop="10dp"
                          app:documentView_textColor="#333"
                          app:documentView_textFormat="plain"
                          app:documentView_textSize="12sp"
                          ext:documentView_textAlignment="justified" /&gt;
  
  
                  &lt;/LinearLayout&gt;
  
  
                  &lt;LinearLayout
                      android:layout_width="match_parent"
                      android:layout_height="match_parent"
                      android:layout_marginTop="10dp"
                      android:orientation="vertical"&gt;
  
                      &lt;TextView
                          android:layout_width="130dp"
                          android:layout_height="15dp"
                          android:layout_gravity="center"
                          android:background="#5EB6C2"
                          android:gravity="center"
                          android:text="Facilities"
                          android:textAllCaps="true"
                          android:textColor="#FFFFFF"
                          android:textSize="12sp" /&gt;
  
                      &lt;View
                          android:layout_width="200dp"
                          android:layout_height="1dp"
                          android:layout_gravity="center"
                          android:background="#5EB6C2" /&gt;
  
  
                      &lt;GridView
                          android:id="@+id/book_homestay_gridView_facilities"
                          android:layout_width="match_parent"
                          android:layout_height="wrap_content"
                          android:layout_marginLeft="10dp"
                          android:layout_marginRight="5dp"
                          android:layout_marginTop="30dp"
  
  
                          android:horizontalSpacing="5dp"
                          android:numColumns="2"
                          android:stretchMode="columnWidth"
                          android:verticalSpacing="5dp" /&gt;
  
  
                  &lt;/LinearLayout&gt;
  
  
                  &lt;LinearLayout
                      android:layout_width="match_parent"
                      android:layout_height="wrap_content"
                      android:layout_marginTop="10dp"
                      android:orientation="vertical"&gt;
  
                      &lt;TextView
                          android:layout_width="130dp"
                          android:layout_height="15dp"
                          android:layout_gravity="center"
                          android:background="#5EB6C2"
                          android:gravity="center"
                          android:text="Meals"
                          android:textAllCaps="true"
                          android:textColor="#FFFFFF"
                          android:textSize="12sp" /&gt;
  
                      &lt;View
                          android:layout_width="200dp"
                          android:layout_height="1dp"
                          android:layout_gravity="center"
                          android:background="#5EB6C2" /&gt;
  
                      &lt;GridView
                          android:id="@+id/book_homestay_gridViewMeal"
                          android:layout_width="match_parent"
                          android:layout_height="wrap_content"
                          android:layout_marginLeft="10dp"
                          android:layout_marginRight="5dp"
                          android:layout_marginTop="30dp"
                          android:horizontalSpacing="5dp"
                          android:numColumns="2"
                          android:stretchMode="columnWidth"
                          android:verticalSpacing="5dp" /&gt;
  
  
                  &lt;/LinearLayout&gt;
  
  
                  &lt;LinearLayout
                      android:layout_width="match_parent"
                      android:layout_height="wrap_content"
                      android:layout_marginTop="10dp"
                      android:orientation="vertical"&gt;
  
                      &lt;TextView
                          android:layout_width="130dp"
                          android:layout_height="15dp"
                          android:layout_gravity="center"
                          android:background="#5EB6C2"
                          android:gravity="center"
                          android:text="Area Facilities"
                          android:textAllCaps="true"
                          android:textColor="#FFFFFF"
                          android:textSize="12sp" /&gt;
  
                      &lt;View
                          android:layout_width="200dp"
                          android:layout_height="1dp"
                          android:layout_gravity="center"
                          android:background="#5EB6C2" /&gt;
  
                      &lt;GridView
                          android:id="@+id/book_homestay_gridViewAreaFacilities"
                          android:layout_width="match_parent"
                          android:layout_height="wrap_content"
                          android:layout_marginLeft="10dp"
                          android:layout_marginRight="5dp"
                          android:layout_marginTop="30dp"
                          android:horizontalSpacing="5dp"
                          android:numColumns="2"
                          android:stretchMode="columnWidth"
                          android:verticalSpacing="5dp" /&gt;
  
  
                  &lt;/LinearLayout&gt;
  
  
                  &lt;LinearLayout
                      android:layout_width="match_parent"
                      android:layout_height="wrap_content"
                      android:layout_marginTop="10dp"
                      android:orientation="vertical"&gt;
  
                      &lt;TextView
                          android:layout_width="130dp"
                          android:layout_height="15dp"
                          android:layout_gravity="center"
                          android:background="#5EB6C2"
                          android:gravity="center"
                          android:text="Rooms"
                          android:textAllCaps="true"
                          android:textColor="#FFFFFF"
                          android:textSize="12sp" /&gt;
  
                      &lt;View
                          android:layout_width="200dp"
                          android:layout_height="1dp"
                          android:layout_gravity="center"
                          android:background="#5EB6C2" /&gt;
  
                      &lt;GridView
                          android:id="@+id/book_homestay_gridViewRooms"
                          android:layout_width="match_parent"
                          android:layout_height="wrap_content"
                          android:layout_marginLeft="10dp"
                          android:layout_marginRight="5dp"
                          android:layout_marginTop="30dp"
                          android:horizontalSpacing="5dp"
                          android:numColumns="2"
                          android:stretchMode="columnWidth"
                          android:verticalSpacing="5dp" /&gt;
  
  
                  &lt;/LinearLayout&gt;
  
  
                  &lt;LinearLayout
                      android:layout_width="match_parent"
                      android:layout_height="wrap_content"
                      android:layout_marginTop="10dp"
                      android:orientation="vertical"&gt;
  
                      &lt;TextView
                          android:layout_width="130dp"
                          android:layout_height="15dp"
                          android:layout_gravity="center"
                          android:background="#5EB6C2"
                          android:gravity="center"
                          android:text="House Rules"
                          android:textAllCaps="true"
                          android:textColor="#FFFFFF"
                          android:textSize="12sp" /&gt;
  
                      &lt;View
                          android:layout_width="200dp"
                          android:layout_height="1dp"
                          android:layout_gravity="center"
                          android:background="#5EB6C2" /&gt;
  
                      &lt;GridView
                          android:id="@+id/book_homestay_gridViewHouseRules"
                          android:layout_width="match_parent"
                          android:layout_height="match_parent"
                          android:layout_marginLeft="10dp"
                          android:layout_marginRight="5dp"
                          android:layout_marginTop="30dp"
                          android:horizontalSpacing="5dp"
                          android:numColumns="2"
                          android:stretchMode="columnWidth"
                          android:verticalSpacing="5dp" /&gt;
  
  
                  &lt;/LinearLayout&gt;
  
                  &lt;LinearLayout
                      android:layout_width="match_parent"
                      android:layout_height="40dp"
                      android:layout_marginTop="10dp"
                      android:gravity="center"&gt;
  
                      &lt;TextView
                          android:id="@+id/textViewRateAndReview"
                          android:layout_width="150dp"
                          android:layout_height="match_parent"
                          android:layout_gravity="center"
                          android:layout_marginBottom="10dp"
                          android:layout_marginTop="5dp"
                          android:background="@drawable/rounded_edittext"
                          android:gravity="center"
                          android:text="@string/nameHere"
                          android:textAllCaps="true"
                          android:textColor="#4FA8B5"
                          android:textStyle="bold" /&gt;
  
  
                  &lt;/LinearLayout&gt;
  
              &lt;/LinearLayout&gt;
          &lt;/ScrollView&gt;
  </code></pre>
  
  <p><strong>items_xml</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:layout_marginLeft="20dp"
      android:orientation="horizontal"&gt;
  
      &lt;ImageView
          android:id="@+id/imageViewTickMark"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_gravity="center"
          android:layout_marginRight="5dp" /&gt;
  
      &lt;TextView
          android:id="@+id/textViewFacilities"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_marginLeft="5dp"
          android:gravity="center"
          android:layout_gravity="center"/&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p><strong>image I want to get</strong></p>
  
  <p><a href="https://i.stack.imgur.com/LQHlwm.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/LQHlwm.jpg" alt="enter image description here"></a></p>
  
  <p><strong>image I am getting</strong></p>
  
  <p><a href="https://i.stack.imgur.com/po4eJm.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/po4eJm.png" alt="enter image description here"></a></p>
  
  <p>This is a layout issue, I know that but I'm not able to solve this issue. How can this issue be solved?</p>