title: Android Studio: Difference in the layout between Preview and Simulator mode
body: <p>I am just new diving into Android app development world and created recently my first calculator app. When I run the app on the simulator, I saw a problem that there is a difference between the layout in the Preview mode and the one in the Simulator mode, as you can see below: </p>
  
  <p><a href="https://i.stack.imgur.com/okY5L.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/okY5L.png" alt="enter image description here"></a></p>
  
  <p>And here is my <code>content_main.xml</code> file: </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;android.support.constraint.ConstraintLayout
      xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools"
      xmlns:app="http://schemas.android.com/apk/res-auto"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      app:layout_behavior="@string/appbar_scrolling_view_behavior"
      tools:showIn="@layout/activity_main"
      tools:context="com.example.sonduong.calculator.MainActivity"&gt;
  
      &lt;TextView
          android:id="@+id/textView3"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:text="of"
          android:textSize="24sp"
          tools:layout_editor_absoluteX="181dp"
          tools:layout_editor_absoluteY="255dp" /&gt;
  
      &lt;TextView
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:text="%"
          android:textSize="24sp"
          tools:layout_editor_absoluteX="300dp"
          tools:layout_editor_absoluteY="207dp" /&gt;
  
      &lt;EditText
          android:id="@+id/numberTxt"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:ems="10"
          android:hint="Enter Number"
          android:inputType="numberDecimal"
          android:textAlignment="center"
          tools:layout_editor_absoluteX="85dp"
          tools:layout_editor_absoluteY="296dp" /&gt;
  
      &lt;TextView
          android:id="@+id/totalTextView"
          android:layout_width="0dp"
          android:layout_height="wrap_content"
          android:text="0"
          android:textAlignment="center"
          android:textSize="36sp"
          app:layout_constraintBottom_toBottomOf="parent"
          app:layout_constraintLeft_toLeftOf="parent"
          app:layout_constraintRight_toRightOf="parent"
          app:layout_constraintTop_toTopOf="parent"
          app:layout_constraintVertical_bias="0.101" /&gt;
  
      &lt;TextView
          android:id="@+id/textView"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:text="What is"
          android:textSize="24sp"
          tools:layout_editor_absoluteX="152dp"
          tools:layout_editor_absoluteY="129dp" /&gt;
  
      &lt;EditText
          android:id="@+id/percentageTxt"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:ems="10"
          android:hint="Enter Percentage"
          android:inputType="numberDecimal"
          android:textAlignment="center"
          tools:layout_editor_absoluteX="85dp"
          tools:layout_editor_absoluteY="193dp" /&gt;
  
      &lt;Button
          android:id="@+id/calcBtn"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:text="CALCULATE"
          tools:layout_editor_absoluteX="147dp"
          tools:layout_editor_absoluteY="374dp" /&gt;
  
  &lt;/android.support.constraint.ConstraintLayout&gt;
  </code></pre>
  
  <p>However in this xml file I also got some errors and they look like: </p>
  
  <p><a href="https://i.stack.imgur.com/7kWb2.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7kWb2.png" alt="enter image description here"></a></p>
  
  <p>Can anyone help me how can I adjust to have the same view between Preview and Simulator. Thank you!</p>