 <p>You specified <code>fill_parent</code> for both the <code>layout_width</code> and <code>layout_height</code> of your <code>RelativeLayout</code>, therefore it fills up it's parent view. By default, a relative layout arranges it's children to the top-left corner, regardless you use <code>fill_parent</code> for the size. </p> <p>You should achieve the desired aspect by taking advantage of the <code>RelativeLayout's</code> own attribute set, which helps you arrange the child views <strong>relatively</strong> to each other or to their parent:</p> <pre><code>&lt;ImageButton android:id="@+id/buttonLog" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerInParent="true" android:background="@drawable/log" android:onClick="log" /&gt; </code></pre> <p>Using the <code>android:layout_centerInParent</code> you can achieve this. This attribute if set true, centers this child horizontally and vertically within its parent.</p>