title: Design layout display is not the same
body: <p>How to edit xml file layout. All display screen is the same.</p>
  
  <p>screen size 4.7", 5.0" display accuracy. But screen other than this. Display Distortion. Except screen tablet.</p>
  
  <p>Help me fix it.</p>
  
  <p>screen_main.xml</p>
  
  <pre><code>&lt;FrameLayout 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"
      tools:context="jp.vertice.test.MainScreenFragment"&gt;
  
      &lt;!-- TODO: Update blank fragment layout --&gt;
  
      &lt;RelativeLayout
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:background="#51c8fc"&gt;
  
          &lt;ImageView
              android:layout_width="200dp"
              android:layout_height="195dp"
              android:id="@+id/imageView2"
              android:src="@mipmap/ic_launcher"
              android:background="#fc0c0c"
              android:layout_marginLeft="18dp"
              android:layout_marginStart="18dp"
              android:layout_alignParentTop="true"
              android:layout_alignParentLeft="true"
              android:layout_alignParentStart="true" /&gt;
  
          &lt;ImageButton
              android:layout_width="100dp"
              android:layout_height="100dp"
              android:id="@+id/btn1"
              android:layout_alignParentTop="true"
              android:layout_alignLeft="@+id/btn3"
              android:layout_alignStart="@+id/btn3" /&gt;
  
          &lt;ImageButton
              android:layout_width="100dp"
              android:layout_height="100dp"
              android:id="@+id/btn2"
              android:layout_below="@+id/btn1"
              android:layout_alignLeft="@+id/btn1"
              android:layout_alignStart="@+id/btn1" /&gt;
  
          &lt;ImageButton
              android:layout_width="100dp"
              android:layout_height="100dp"
              android:id="@+id/btn5"
              android:layout_below="@+id/btn2"
              android:layout_alignLeft="@+id/imageView2"
              android:layout_alignStart="@+id/imageView2"
              android:layout_marginTop="5dp" /&gt;
  
          &lt;ImageButton
              android:layout_width="100dp"
              android:layout_height="100dp"
              android:id="@+id/btn4"
              android:layout_alignTop="@+id/btn5"
              android:layout_toRightOf="@+id/btn5"
              android:layout_toEndOf="@+id/btn5"
              android:layout_marginLeft="9dp"
              android:layout_marginStart="9dp" /&gt;
  
          &lt;ImageButton
              android:layout_width="100dp"
              android:layout_height="100dp"
              android:id="@+id/btn3"
              android:layout_alignTop="@+id/btn4"
              android:layout_toRightOf="@+id/btn4"
              android:layout_toEndOf="@+id/btn4"
              android:layout_marginLeft="10dp"
              android:layout_marginStart="10dp" /&gt;
      &lt;/RelativeLayout&gt;
  
      &lt;RelativeLayout
          android:layout_width="fill_parent"
          android:layout_height="205dp"
          android:background="#F4F4F4"
          android:layout_gravity="bottom"&gt;
  
          &lt;TextView
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:textAppearance="?android:attr/textAppearanceSmall"
              android:text="YYYY.MM.DD"
              android:id="@+id/txt1"
              android:layout_alignParentBottom="true"
              android:layout_alignParentLeft="true"
              android:layout_alignParentStart="true"
              android:layout_marginLeft="22dp"
              android:layout_marginStart="22dp"
              android:layout_marginBottom="173dp" /&gt;
  
          &lt;TextView
              android:layout_width="230dp"
              android:layout_height="50dp"
              android:textAppearance="?android:attr/textAppearanceMedium"
              android:text="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
              android:id="@+id/text2"
              android:layout_alignTop="@+id/txt1"
              android:layout_alignLeft="@+id/txt1"
              android:layout_alignStart="@+id/txt1"
              android:layout_marginTop="25dp" /&gt;
  
          &lt;Button
              style="?android:attr/buttonStyleSmall"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:text="BUTTON"
              android:id="@+id/btn6"
              android:layout_marginLeft="11dp"
              android:layout_marginStart="11dp"
              android:layout_alignTop="@+id/text2"
              android:layout_toRightOf="@+id/text2"
              android:layout_toEndOf="@+id/text2" /&gt;
  
          &lt;TextView
              android:layout_width="fill_parent"
              android:layout_height="20dp"
              android:textAppearance="?android:attr/textAppearanceSmall"
              android:text="FOOTER"
              android:id="@+id/textView2"
              android:layout_alignParentBottom="true"
              android:layout_alignParentLeft="true"
              android:layout_alignParentStart="true"
              android:textSize="10sp"
              android:textStyle="bold"
              android:textAlignment="center"
              android:gravity="center_vertical"
              android:background="#FFFFFF" /&gt;
  
      &lt;/RelativeLayout&gt;
  &lt;/FrameLayout&gt;
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/8J2KP.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8J2KP.png" alt="Display is not the same"></a></p>