title: GridView elements horizontal spacing not working at all
body: <p>So here's how my grid view looks like:
  <a href="http://imageshack.com/a/img41/7857/roir.png" rel="nofollow noreferrer">a http://imageshack.com/a/img41/7857/roir.png</a>
  I use some online JSON parsing and get the image thumbnail links and then pass it on as an array to the custom adapter and it sets images for which I again use some 3rd party library etc. But the 3rd party library is just used to set the image to the imageview. That's it.</p>
  
  <p>So I have a main FragmentActivity. It has 2 fragments inside of it. The textbox u see there is inside one fragment(search fragment) and on top of it, the gridview is held by the second fragment. (results fragment)</p>
  
  <p>Code for the results fragment:</p>
  
  <pre><code>&lt;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:background="#f0f0f0"
      tools:context="com.example.wikipicsearch.MainActivity" &gt;
  
      &lt;GridView
          android:id="@+id/gridView"
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"
          android:layout_margin="5dp"
          android:columnWidth="100dp"
          android:gravity="center"
          android:numColumns="auto_fit"
          android:verticalSpacing="5dp"
          android:drawSelectorOnTop="true"
          android:stretchMode="columnWidth" &gt;
      &lt;/GridView&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>Code for the layout that I pass onto the custom Adapter:</p>
  
  <pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:orientation="vertical"
      android:padding="5dp" 
      android:clickable="true"
      android:background="@drawable/grid_color_selector"
      android:focusable="true"&gt;
  
      &lt;ImageView
          android:id="@+id/image"
          android:layout_width="100dp"
          android:layout_height="100dp"
          android:layout_margin="0dp"
          android:layout_gravity="center" &gt;
      &lt;/ImageView&gt;
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>Now, I have no clue why on earth is there no horizontal spacing between each of that linear layout. I tried using <code>android:layout_marginLeft</code> etc etc... nothing works at all! I made the fragment holding the gridview look grey so that the each element in the grid will leave some spacing and it should look good. Please help me out with this. TIA!</p>