 <p>You could try one like this</p> <pre><code>&lt;RelativeLayout android:layout_width="200dp" android:layout_height="150dp" android:layout_centerInParent="true"&gt; &lt;RelativeLayout android:layout_width="120dp" android:layout_height="match_parent" android:layout_alignParentLeft="true" android:background="#aaff0000"&gt;&lt;/RelativeLayout&gt; &lt;RelativeLayout android:layout_width="120dp" android:layout_height="match_parent" android:layout_alignParentRight="true" android:background="#aa00ff00"&gt;&lt;/RelativeLayout&gt; &lt;/RelativeLayout&gt; </code></pre>