title: Android XML Layout for all Devices (Small/Normal/Large/XLarge, etc)
body: <p>I want to create a XML Layout that will support all the Screen sizes. In the XML, first element is <code>ImageView</code>, second one is <code>TextView</code> and third one is <code>Button</code> with an Image. So the <code>TextView</code> should be the exact position in all the devices (small, medium, large, xLarge, etc). <br/></p>
  
  <p>How can I do this? </p>
  
  <p>Here is the XML output should be look like:</p>
  
  <p><img src="https://i.stack.imgur.com/85pEn.png" alt="enter image description here"> </p>
  
  <p>Here is the XML file that i created for the Normal/Medium Layout:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:tools="http://schemas.android.com/tools"
  android:layout_width="fill_parent"
  android:layout_height="fill_parent"
  android:orientation="vertical" &gt;
  
  &lt;ImageView
      android:id="@+id/imageView1"
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      android:layout_alignParentLeft="true"
      android:layout_alignParentTop="true"
      android:src="@drawable/firstscreenimage" /&gt;
  
  &lt;RelativeLayout
      android:id="@+id/relativeLayout2"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:layout_alignParentBottom="true"
      android:layout_alignParentLeft="true" &gt;
  
      &lt;EditText
          android:id="@+id/campa"
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"
          android:layout_toRightOf="@+id/textView3"
          android:ems="10" &gt;
  
          &lt;requestFocus /&gt;
      &lt;/EditText&gt;
  
      &lt;TextView
          android:id="@+id/textView3"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_alignParentLeft="true"
          android:layout_alignParentTop="true"
          android:gravity="center"
          android:text="My Current\n Campaign" /&gt;
  &lt;/RelativeLayout&gt;
  
  &lt;RelativeLayout
      android:id="@+id/relativeLayout1"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:layout_above="@+id/relativeLayout2"
      android:layout_alignParentLeft="true" &gt;
  
      &lt;Button
          android:id="@+id/button1"
          android:layout_width="210dp"
          android:layout_height="210dp"
          android:layout_centerHorizontal="true"
          android:layout_centerVertical="true"
          android:background="@drawable/animation0" /&gt;
  
      &lt;TextView
          android:id="@+id/textView2"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_alignBaseline="@+id/button1"
          android:layout_alignBottom="@+id/button1"
          android:layout_centerHorizontal="true"
          android:gravity="center"
          android:text="Start" /&gt;
  &lt;/RelativeLayout&gt;
  
  &lt;TextView
      android:id="@+id/textView1"
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      android:layout_above="@+id/relativeLayout1"
      android:layout_alignParentLeft="true"
      android:layout_marginBottom="42dp"
      android:gravity="right"
      android:paddingRight="25dp"
      android:text="0.0km"
      android:textSize="30dp" /&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>