title: Unable to Center (Android) GridView Items using android:layout_gravity="center"
body: <p>I'm attempting to center items in a GridView using <code>android:layout_gravity="center"</code> however they continually appear pushed up against the left edge and I cannot seem to spot what I have done wrong in this instance. </p>
  
  <p><img src="https://i.stack.imgur.com/tBExo.png" alt="enter image description here"></p>
  
  <h2>XML:</h2>
  
  <pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:id="@+id/ListView_layout"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:weightSum="1" &gt;
  
      &lt;RelativeLayout
          android:id="@+id/rl_ListView1"
          android:layout_width="0dp"
          android:layout_height="match_parent"
          android:layout_weight="0.5" &gt;
  
          &lt;ImageView
              android:id="@+id/imageView1"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_alignParentLeft="true"
              android:layout_alignParentTop="true"
              android:src="@drawable/boxart" /&gt;
      &lt;/RelativeLayout&gt;
  
      &lt;RelativeLayout
          android:id="@+id/rl_ListView2"
          android:layout_width="0dp"
          android:layout_height="match_parent"
          android:layout_marginTop="30dp"
          android:layout_weight="0.5" &gt;
  
          &lt;GridLayout
              android:id="@+id/GridLayout1"
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              android:layout_gravity="center"
              android:columnCount="4"
              android:orientation="horizontal"
              android:rowCount="4" &gt;
  
              &lt;Button
                  android:id="@+id/button0"
                  android:layout_column="0"
                  android:layout_row="0"
                  android:text="Button" /&gt;
  
              &lt;Button
                  android:id="@+id/button1"
                  android:layout_column="1"
                  android:layout_row="0"
                  android:text="Button" /&gt;
  
              &lt;Button
                  android:id="@+id/button2"
                  android:layout_column="2"
                  android:layout_row="0"
                  android:text="Button" /&gt;
              &lt;Button
                  android:id="@+id/button3"
                  android:layout_column="3"
                  android:layout_row="0"
                  android:text="Button" /&gt;
          &lt;/GridLayout&gt;
      &lt;/RelativeLayout&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>