Android: Center ImageButton in LinearLayout
<p>How can I center ImageButton in the this LinearLayout</p>

<pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/main"
&gt;
</code></pre>

<p>ImageButton</p>

<pre><code>              &lt;ImageButton android:id="@+id/btnBut"
                      android:background="@drawable/button"
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content" /&gt;
</code></pre>

<p>I don't want to use fixed sizes.</p>

<p>Thanks</p>
