title: Android Studio - Android Emulator presents the layout differently. There appears to be less height when the emulator runs the program
body: <p>I have a program that runs fine and will load to the emulator but the screen length seems to shrink. I know the obvious mistake is not using constraint layout properly or not using the same emulator model/options but I believe I am. It appears to be effecting the entire application so I edited one of the buttons on the main menu to be really long to emphasize the problem.</p>
  
  <p>Example and compare pics can be found here: <a href="https://imgur.com/a/AONGuaF" rel="nofollow noreferrer">https://imgur.com/a/AONGuaF</a></p>
  
  <p>I only noticed the problem when my feedback table got too long and started overlapping my 'calculate' button barely, then I noticed on the xml view I had plenty free space between the end of the feedback table and the calculate button. I guess it could be something to do with no action bar but I have moved objects to the very top and bottom of the screen and they appear fine so I am not sure.</p>
  
  <p>XML file:</p>
  
  <p>
  
  
  <pre><code>xmlns:app="http://schemas.android.com/apk/res-auto"
  xmlns:tools="http://schemas.android.com/tools"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  android:background="@drawable/sky"
  tools:context="com.example.greg.securityeduc.PasswordMeter"&gt;
  
  
  &lt;ProgressBar
      android:id="@+id/password_Meter"
  
      style="?android:attr/progressBarStyleHorizontal"
      android:layout_width="372dp"
      android:layout_height="50dp"
      android:layout_alignParentTop="true"
      android:layout_centerHorizontal="true"
      android:layout_marginStart="20dp"
  
      android:layout_marginTop="80dp"
  
      android:indeterminateOnly="false"
      android:visibility="invisible"
      app:layout_constraintStart_toStartOf="parent"
      app:layout_constraintTop_toTopOf="parent"&gt;
  
  
  &lt;/ProgressBar&gt;
  
  
  &lt;ImageView
      android:id="@+id/img_EightChars"
      android:layout_width="45dp"
      android:layout_height="50dp"
      android:layout_marginStart="19sp"
      android:layout_marginTop="110sp"
      android:visibility="visible"
      app:layout_constraintStart_toStartOf="parent"
      app:layout_constraintTop_toTopOf="parent"
      app:srcCompat="@android:drawable/ic_input_add" /&gt;
  
  &lt;ImageView
      android:id="@+id/img_Number"
      android:layout_width="45dp"
      android:layout_height="50dp"
      android:layout_marginStart="19sp"
      android:layout_marginTop="160sp"
      android:visibility="visible"
      app:layout_constraintStart_toStartOf="parent"
      app:layout_constraintTop_toTopOf="parent"
      app:srcCompat="@android:drawable/ic_input_add" /&gt;
  
  &lt;ImageView
      android:id="@+id/img_SpecialChar"
      android:layout_width="45sp"
      android:layout_height="50dp"
      android:layout_marginStart="19sp"
      android:layout_marginTop="210sp"
      android:visibility="visible"
      app:layout_constraintStart_toStartOf="parent"
      app:layout_constraintTop_toTopOf="parent"
      app:srcCompat="@android:drawable/ic_input_add" /&gt;
  
  &lt;ImageView
      android:id="@+id/img_Uppercase"
      android:layout_width="45sp"
      android:layout_height="50dp"
      android:layout_marginStart="19sp"
      android:layout_marginTop="260sp"
      android:visibility="visible"
      app:layout_constraintStart_toStartOf="parent"
      app:layout_constraintTop_toTopOf="parent"
      app:srcCompat="@android:drawable/ic_delete" /&gt;
  
  &lt;ImageView
      android:id="@+id/img_Lowercase"
      android:layout_width="45sp"
      android:layout_height="50dp"
      android:layout_marginStart="19sp"
      android:layout_marginTop="310sp"
      android:visibility="visible"
      app:layout_constraintStart_toStartOf="parent"
      app:layout_constraintTop_toTopOf="parent"
      app:srcCompat="@android:drawable/ic_input_add" /&gt;
  
  &lt;ImageView
      android:id="@+id/img_NoDates"
      android:layout_width="45sp"
      android:layout_height="50dp"
      android:layout_marginStart="19sp"
      android:layout_marginTop="360sp"
      android:visibility="visible"
      app:layout_constraintStart_toStartOf="parent"
      app:layout_constraintTop_toTopOf="parent"
      app:srcCompat="@android:drawable/ic_input_add" /&gt;
  
  &lt;ImageView
      android:id="@+id/img_NoRepeatChars"
      android:layout_width="45sp"
      android:layout_height="50dp"
      android:layout_marginStart="19sp"
      android:layout_marginTop="410sp"
      android:visibility="visible"
      app:layout_constraintStart_toStartOf="parent"
      app:layout_constraintTop_toTopOf="parent"
      app:srcCompat="@android:drawable/ic_input_add" /&gt;
  
  &lt;ImageView
      android:id="@+id/img_NoLoneNumber"
      android:layout_width="45sp"
      android:layout_height="50dp"
      android:layout_marginStart="19sp"
      android:layout_marginTop="460sp"
      android:visibility="visible"
      app:layout_constraintStart_toStartOf="parent"
      app:layout_constraintTop_toTopOf="parent"
      app:srcCompat="@android:drawable/ic_delete" /&gt;
  
  &lt;ImageView
      android:id="@+id/img_NoLoneCapital"
      android:layout_width="45sp"
      android:layout_height="50dp"
      android:layout_marginStart="19sp"
      android:layout_marginTop="510sp"
      android:visibility="visible"
      app:layout_constraintStart_toStartOf="parent"
      app:layout_constraintTop_toTopOf="parent"
      app:srcCompat="@android:drawable/ic_input_add" /&gt;
  
  &lt;ImageView
      android:id="@+id/img_Top100"
      android:layout_width="45sp"
      android:layout_height="50dp"
      android:layout_marginStart="19sp"
      android:layout_marginTop="560sp"
      android:visibility="visible"
      app:layout_constraintStart_toStartOf="parent"
      app:layout_constraintTop_toTopOf="parent"
      app:srcCompat="@android:drawable/ic_input_add" /&gt;
  
  &lt;TextView
      android:id="@+id/txt_Number"
      android:layout_width="372sp"
      android:layout_height="50dp"
      android:layout_marginStart="20sp"
      android:layout_marginTop="160sp"
      android:fontFamily="@font/quicksandbold"
      android:paddingLeft="45sp"
      android:paddingTop="12sp"
      android:text="1 X NUMERIC CHARACTER(S)"
      android:textColor="@color/white"
      android:textSize="21sp"
      android:visibility="visible"
      app:layout_constraintStart_toStartOf="parent"
      app:layout_constraintTop_toTopOf="parent" /&gt;
  
  &lt;TextView
      android:id="@+id/txt_SpecialChar"
      android:layout_width="372sp"
      android:layout_height="50dp"
      android:layout_marginStart="20sp"
      android:layout_marginTop="210sp"
      android:fontFamily="@font/quicksandbold"
      android:paddingLeft="45sp"
      android:paddingTop="12sp"
      android:text="1 X SPECIAL CHARACTER(S)"
      android:textColor="@color/white"
      android:textSize="21sp"
      android:visibility="visible"
      app:layout_constraintStart_toStartOf="parent"
      app:layout_constraintTop_toTopOf="parent" /&gt;
  
  &lt;TextView
      android:id="@+id/txt_Uppercase"
      android:layout_width="372sp"
      android:layout_height="50dp"
      android:layout_marginStart="20sp"
      android:layout_marginTop="260sp"
      android:fontFamily="@font/quicksandbold"
      android:paddingLeft="45sp"
      android:paddingTop="12sp"
      android:text="1 X UPPERCASE LETTER(S)"
      android:textColor="@color/white"
      android:textSize="21sp"
      android:visibility="visible"
      app:layout_constraintStart_toStartOf="parent"
      app:layout_constraintTop_toTopOf="parent" /&gt;
  
  &lt;TextView
      android:id="@+id/txt_Lowercase"
      android:layout_width="372sp"
      android:layout_height="50dp"
      android:layout_marginStart="20sp"
      android:layout_marginTop="310sp"
      android:fontFamily="@font/quicksandbold"
      android:paddingLeft="45sp"
      android:paddingTop="12sp"
      android:text="1 X LOWERCASE LETTER(S)"
      android:textColor="@color/white"
      android:textSize="21sp"
      android:visibility="visible"
      app:layout_constraintStart_toStartOf="parent"
      app:layout_constraintTop_toTopOf="parent" /&gt;
  
  &lt;TextView
      android:id="@+id/txt_NoDates"
      android:layout_width="372sp"
      android:layout_height="50dp"
      android:layout_marginStart="20sp"
      android:layout_marginTop="360sp"
      android:fontFamily="@font/quicksandbold"
      android:paddingLeft="45sp"
      android:paddingTop="12sp"
      android:text="NO DATES (DD/MM/YYYY)"
      android:textColor="@color/white"
      android:textSize="21sp"
      android:visibility="visible"
      app:layout_constraintStart_toStartOf="parent"
      app:layout_constraintTop_toTopOf="parent" /&gt;
  
  &lt;TextView
      android:id="@+id/txt_EightChars"
      android:layout_width="372sp"
      android:layout_height="50dp"
      android:layout_marginStart="20sp"
      android:layout_marginTop="110sp"
      android:fontFamily="@font/quicksandbold"
      android:paddingLeft="45sp"
      android:paddingTop="12sp"
      android:text="8+ TOTAL CHARACTERS"
      android:textColor="@color/white"
      android:textSize="21sp"
      android:visibility="visible"
      app:layout_constraintStart_toStartOf="parent"
      app:layout_constraintTop_toTopOf="parent" /&gt;
  
  &lt;TextView
      android:id="@+id/txt_NoRepeatChars"
      android:layout_width="372sp"
      android:layout_height="50dp"
      android:layout_marginStart="20sp"
      android:layout_marginTop="410sp"
      android:fontFamily="@font/quicksandbold"
      android:paddingLeft="45sp"
      android:paddingTop="12sp"
      android:text="NO REPEAT CHARACTERS"
      android:textColor="@color/white"
      android:textSize="21sp"
      android:visibility="visible"
      app:layout_constraintStart_toStartOf="parent"
      app:layout_constraintTop_toTopOf="parent" /&gt;
  
  &lt;TextView
      android:id="@+id/txt_NoLoneNumber"
      android:layout_width="372sp"
      android:layout_height="50dp"
      android:layout_marginStart="20sp"
      android:layout_marginTop="460sp"
      android:fontFamily="@font/quicksandbold"
      android:paddingLeft="45sp"
      android:paddingTop="12sp"
      android:text="NO LONE NUMBER AT END"
      android:textColor="@color/white"
      android:textSize="21sp"
      android:visibility="visible"
      app:layout_constraintStart_toStartOf="parent"
      app:layout_constraintTop_toTopOf="parent" /&gt;
  
  &lt;TextView
      android:id="@+id/txt_NoLoneCapital"
      android:layout_width="372sp"
      android:layout_height="50dp"
      android:layout_marginStart="20sp"
      android:layout_marginTop="510sp"
      android:fontFamily="@font/quicksandbold"
      android:paddingLeft="45sp"
      android:paddingTop="12sp"
      android:text="NO LONE CAPITAL AT START"
      android:textColor="@color/white"
      android:textSize="21sp"
      android:visibility="visible"
      app:layout_constraintStart_toStartOf="parent"
      app:layout_constraintTop_toTopOf="parent" /&gt;
  
  &lt;TextView
      android:id="@+id/txt_Top100"
      android:layout_width="372sp"
      android:layout_height="50dp"
      android:layout_marginStart="20sp"
      android:layout_marginTop="560sp"
      android:fontFamily="@font/quicksandbold"
      android:paddingLeft="45sp"
      android:paddingTop="12sp"
      android:text="NOT IN TOP 100 DATABASE"
      android:textColor="@color/white"
      android:textSize="21sp"
      android:visibility="visible"
      app:layout_constraintStart_toStartOf="parent"
      app:layout_constraintTop_toTopOf="parent" /&gt;
  
  
  &lt;TextView
      android:id="@+id/txt_FeedbackBorder"
      android:layout_width="372dp"
      android:layout_height="500sp"
      android:layout_marginTop="110sp"
      android:background="@drawable/edittextborder"
      android:visibility="visible"
      app:layout_constraintEnd_toEndOf="parent"
      app:layout_constraintHorizontal_bias="0.487"
      app:layout_constraintStart_toStartOf="parent"
      app:layout_constraintTop_toTopOf="parent" /&gt;
  
  &lt;EditText
      android:id="@+id/e_Txt_Password"
      android:layout_width="372sp"
      android:layout_height="50dp"
      android:layout_alignStart="@+id/password_Meter"
      android:layout_alignTop="@+id/password_Meter"
      android:layout_marginStart="52dp"
      android:layout_marginTop="48dp"
      android:layout_marginEnd="52dp"
      android:background="@drawable/edittextborder"
      android:fontFamily="@font/quicksandbold"
      android:inputType="textNoSuggestions"
      android:maxLength="15"
      android:maxLines="1"
      android:paddingLeft="10sp"
      android:paddingBottom="4sp"
      android:singleLine="true"
      android:soundEffectsEnabled="false"
      android:text="example"
      android:textAlignment="textStart"
      android:textColor="@color/white"
      android:textSize="33sp"
      app:layout_constraintEnd_toEndOf="parent"
      app:layout_constraintHorizontal_bias="0.511"
      app:layout_constraintStart_toStartOf="parent"
      app:layout_constraintTop_toTopOf="parent" /&gt;
  
  &lt;Button
      android:id="@+id/btn_Calculate"
      android:layout_width="350dp"
      android:layout_height="50dp"
      android:layout_below="@+id/e_Txt_Password"
      android:layout_marginBottom="28dp"
      android:layout_toEndOf="@+id/e_Txt_Password"
      android:background="@color/BlackShade"
      android:fontFamily="@font/quicksandbold"
      android:soundEffectsEnabled="false"
      android:text="calculate"
      android:textColor="@color/white"
      android:textSize="25sp"
      app:layout_constraintBottom_toBottomOf="parent"
      app:layout_constraintEnd_toEndOf="parent"
      app:layout_constraintHorizontal_bias="0.491"
      app:layout_constraintStart_toStartOf="parent" /&gt;
  
  &lt;Button
      android:id="@+id/btn_Clear"
      android:layout_width="50dp"
      android:layout_height="50dp"
      android:layout_below="@+id/e_Txt_Password"
      android:layout_marginTop="48dp"
      android:layout_toEndOf="@+id/e_Txt_Password"
      android:background="@android:drawable/btn_dialog"
      android:fontFamily="@font/quicksandbold"
      android:soundEffectsEnabled="false"
      android:textColor="@color/white"
      android:textSize="20dp"
      android:visibility="visible"
      app:layout_constraintEnd_toEndOf="parent"
      app:layout_constraintHorizontal_bias="0.944"
      app:layout_constraintStart_toStartOf="parent"
      app:layout_constraintTop_toTopOf="parent" /&gt;
  
  &lt;TextView
      android:id="@+id/txt_Feedback2"
      android:layout_width="350sp"
      android:layout_height="50dp"
      android:layout_marginTop="104dp"
      android:layout_marginEnd="28dp"
      android:fontFamily="@font/quicksandbold"
      android:textAlignment="center"
      android:textColor="@color/white"
      android:textSize="16sp"
      app:layout_constraintEnd_toEndOf="parent"
      app:layout_constraintTop_toTopOf="parent" /&gt;
  
  &lt;TextView
      android:id="@+id/txt_Stg_Complete"
      android:layout_width="214dp"
      android:layout_height="153dp"
      android:layout_marginTop="700dp"
      android:fontFamily="@font/quicksandbold"
      android:includeFontPadding="false"
      android:textAlignment="center"
      android:textColor="@color/white"
      android:textSize="24sp"
      android:textStyle="bold"
      android:visibility="invisible"
      app:layout_constraintEnd_toEndOf="parent"
      app:layout_constraintTop_toTopOf="parent" /&gt;
  
  &lt;TextView
      android:id="@+id/txt_title_password"
      android:layout_width="330dp"
      android:layout_height="25sp"
      android:layout_marginStart="20dp"
      android:layout_marginTop="20dp"
      android:fontFamily="@font/quicksandbold"
      android:text="PASSWORD"
      android:textColor="@color/white"
      android:textSize="20dp"
      app:layout_constraintStart_toStartOf="parent"
      app:layout_constraintTop_toTopOf="parent" /&gt;
  </code></pre>
  
  <p></p>