I am trying to do following Design
Valid XHTML http://i39.tinypic.com/2rfcxo1.png
My XML Code is as follow
<?xml version="1.0" encoding="utf-8"?>
<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="fill_parent"
android:layout_gravity="fill_vertical" >
<EditText
android:id="@+id/patientid"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_marginLeft="20dp"
android:layout_marginTop="50dp"
android:layout_toLeftOf="@+id/speak"
android:ems="10"
android:hint="@string/patientidhint" >
<requestFocus />
</EditText>
<Button
android:id="@+id/speak"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/patientid"
android:layout_alignParentRight="true"
android:layout_marginRight="10dp"
android:onClick="speak"
android:text="@string/speak"
tools:context=".CreatingPatientFolder"
/>
<ListView
android:id="@+id/lvTextMatches"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/speak"
android:layout_above="@+id/btn_Submit"/>
<Button
android:id="@+id/btn_Submit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginBottom="50dp"
android:layout_alignParentBottom="true"
android:gravity="center"
android:paddingBottom="10dp"
android:paddingLeft="30dp"
android:paddingRight="30dp"
android:paddingTop="10dp"
android:text="Submit"
android:textSize="20sp"
tools:ignore="HardcodedText" />
</RelativeLayout>
Now when I run this project it gets displayed as follow
Valid XHTML http://i40.tinypic.com/9u5b1y.png
So can any one please tell me why my button is getting shift upwards also please help me to remove this issue.