title: Margin/padding top on GridView
body: <p>I have a problem with my GridView. I am using part of Bitmapfun project, and I don't want to have a margin on the top.</p>
  
  <p>See this capture :
  <img src="https://i.stack.imgur.com/EpXGD.jpg" alt="enter image description here"></p>
  
  <p>I have a large black area (where I put the 3 question marks) between the spinner and the first pictures.</p>
  
  <p>If I scroll down, I get a good render : photos slide under the spinner :
  <img src="https://i.stack.imgur.com/utJjM.jpg" alt="enter image description here"></p>
  
  <p>If I go back to the top, I have again this large black area just before the first pics.
  Someone could help me ?</p>
  
  <p>Here is my gridview (image_grid_fragment.xml) :</p>
  
  <pre><code>&lt;GridView xmlns:android="http://schemas.android.com/apk/res/android"
      android:id="@+id/gridView"
      style="@style/PhotoGridLayout"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"
      android:columnWidth="@dimen/image_thumbnail_size"
      android:horizontalSpacing="@dimen/image_thumbnail_spacing"
      android:numColumns="auto_fit"
      android:stretchMode="columnWidth"
      android:verticalSpacing="@dimen/image_thumbnail_spacing" &gt;
  
  &lt;/GridView&gt;
  </code></pre>
  
  <p>The GridView is included in this main layout :</p>
  
  <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"
      android:orientation="vertical" &gt;
  
      &lt;TextView
          android:id="@+id/TextView1"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_alignParentLeft="true"
          android:layout_alignParentTop="true"
          android:layout_marginTop="17dp"
          android:layout_marginLeft="16dp"
          android:text="Album : "
          android:textAppearance="?android:attr/textAppearanceSmallPopupMenu"
          android:textSize="18dp" /&gt;
  
      &lt;Spinner
          android:id="@+id/spinner_album"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_alignParentTop="true"
          android:layout_toRightOf="@+id/TextView1"
          android:layout_marginTop="12dp"
          android:inputType="text"
          android:textSize="18dp" /&gt;
  
      &lt;include layout="@layout/image_grid_fragment" /&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>values/styles.xml :</p>
  
  <pre><code>&lt;style name="PhotoGridLayout"&gt;
      &lt;item name="android:drawSelectorOnTop"&gt;false&lt;/item&gt;
      &lt;item name="android:listSelector"&gt;@drawable/photogrid_list_selector&lt;/item&gt;
  &lt;/style&gt;
  </code></pre>
  
  <p>values-v11/styles.xml :</p>
  
  <pre><code>&lt;style name="PhotoGridLayout"&gt;
      &lt;item name="android:drawSelectorOnTop"&gt;true&lt;/item&gt;
  &lt;/style&gt;
  </code></pre>
  
  <hr>
  
  <p>ImageGridActivity.java :</p>
  
  <pre><code>public class ImageGridActivity extends FragmentActivity {
      private static final String TAG = "ImageGridFragment";
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
  
          if (getSupportFragmentManager().findFragmentByTag(TAG) == null) {
              final FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
              ft.add(android.R.id.content, new ImageGridFragment(), TAG);
              ft.commit();
          }
      }
  }
  </code></pre>
  
  <p>With layout bounds activated in development options, I have this result :</p>
  
  <p><img src="https://i.stack.imgur.com/kQxny.png" alt="enter image description here"></p>