title: Android GridLayout center horizontally
body: <p>I'm trying to create a GridLayout with 2 columns which will be centered. </p>
  
  <p>My avtual design is:</p>
  
  <pre><code>&lt;GridLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:custom="http://schemas.android.com/apk/res-auto"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      custom:rowCount="4"
      custom:columnCount="2"
      android:orientation="horizontal"&gt;
      &lt;TimeTableKeeper.Tile
          android:layout_width="75dp"
          android:layout_height="75dp"
          android:gravity="top|left"
          android:background="#00FF00"
          custom:color="green"
          custom:layout_row="0"
          custom:layout_column="0" /&gt;
      &lt;TimeTableKeeper.Tile
          android:layout_width="75dp"
          android:gravity="top|left"
          android:layout_height="75dp"
          android:background="#00FF00"
          custom:color="blue"
          custom:layout_row="0"
          custom:layout_column="1" /&gt;
  &lt;/GridLayout&gt;
  </code></pre>
  
  <p>And it looks like:</p>
  
  <p><img src="https://i.stack.imgur.com/FAOq0.png" width="150" height="250"></p>
  
  <p>And I would like to have this buttons in the center and perfectly with spacing between them.</p>
  
  <p>Is it possible?</p>
  
  <p>--EDIT:</p>
  
  <p>I have also tried putting it into LinearLayout, without results:</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="match_parent"
      android:gravity="center"
      android:orientation="vertical"&gt;
      &lt;GridLayout xmlns:custom="http://schemas.android.com/apk/res-auto"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          custom:rowCount="4"
          custom:columnCount="2"
          android:orientation="horizontal"
          android:gravity="center"
          android:layout_gravity="center"&gt;
          &lt;TimeTableKeeper.Tile
              android:layout_width="75dp"
              android:layout_height="75dp"
              android:background="#00FF00"
              custom:color="green"
              custom:layout_row="0"
              custom:layout_column="0" /&gt;
          &lt;TimeTableKeeper.Tile
              android:layout_width="75dp"
              android:layout_height="75dp"
              android:background="#00FF00"
              custom:color="blue"
              custom:layout_row="0"
              custom:layout_column="1" /&gt;
      &lt;/GridLayout&gt;
  &lt;/LinearLayout&gt;
  </code></pre>