 <p>For the second button add</p> <pre><code>android:id="@+id/button2" </code></pre> <p>and change</p> <pre><code>android:layout_alignLeft="@+id/button1" </code></pre> <p>to</p> <pre><code>android:layout_alignLeft="@id/button1" </code></pre> <p>Change your layout as follow:</p> <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:gravity="start" android:paddingBottom="@dimen/activity_vertical_margin" android:paddingLeft="@dimen/activity_horizontal_margin" android:paddingRight="@dimen/activity_horizontal_margin" android:paddingTop="@dimen/activity_vertical_margin" tools:context=".MainActivity" &gt; &lt;TextView android:id="@+id/textView1" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_centerHorizontal="true" android:text="your total is 0" android:textSize="65sp" /&gt; &lt;Button android:id="@+id/button1" android:layout_width="100sp" android:layout_height="wrap_content" android:layout_alignLeft="@+id/textView1" android:layout_below="@+id/textView1" android:layout_gravity="center" android:text="add" /&gt; &lt;Button android:id="@+id/button2" android:layout_width="100sp" android:layout_height="wrap_content" android:layout_alignLeft="@id/button1" android:layout_below="@+id/textView1" android:layout_marginLeft="117dp" android:text="subtract" /&gt; &lt;/RelativeLayout&gt; </code></pre>