I am trying to create a static `GridLayout` with two rows and two columns. In the bottom row, a button should be centered across the two columns. Instead, the button seems to be centered only within the right column:

[![enter image description here](https://i.stack.imgur.com/ihTGX.png)](https://i.stack.imgur.com/ihTGX.png)

(I stretched the button's height so the asymmetry would be more obvious.)

I expected these attributes within the `Button` element to center it across the two columns:

```
        android:layout_column="0"
        android:layout_columnSpan="2"
        android:layout_gravity="center_horizontal"

```

Here is my complete layout:

```
<?xml version="1.0" encoding="utf-8"?>
<GridLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:columnCount="2"
    android:rowCount="2">
    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_row="0"
        android:layout_column="0"
        android:text="Title: " />
    <EditText
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_row="0"
        android:layout_column="1"/>
    <Button
        android:layout_width="wrap_content"
        android:layout_height="fill_parent"
        android:text="@string/search"
        android:layout_row="1"
        android:layout_column="0"
        android:layout_columnSpan="2"
        android:layout_gravity="center_horizontal"/>
</GridLayout>

```

How can I center an element across multiple columns?