title: The page designs are different on the Android studio ide and when I build it into my Android phone
body: <p>I am having a problem with my java and xml code. As I am using the Android Studio IDE I can see the good version of the app page I wanna make, while when I export it to my phone and build it it isn't working and everything is on top of each ither. I will be showing the code and pictures of what I see in the ide and what I get on my phone. I hope you can help resolve this issue as I am a beginner android developer since I mainly on web and this issue is really bothering me. Thanks!
  <strong>activity_main.xml</strong></p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
  &lt;androidx.constraintlayout.widget.ConstraintLayout   
  xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
  xmlns:app=&quot;http://schemas.android.com/apk/res-auto&quot;
  xmlns:tools=&quot;http://schemas.android.com/tools&quot;
  android:layout_width=&quot;match_parent&quot;
  android:layout_height=&quot;match_parent&quot;
  android:background=&quot;#fffa94&quot;
  tools:context=&quot;.Definition&quot;&gt;
  
  &lt;TextView
      android:id=&quot;@+id/textView&quot;
      android:layout_width=&quot;wrap_content&quot;
      android:layout_height=&quot;wrap_content&quot;
      android:layout_marginEnd=&quot;88dp&quot;
      android:text=&quot;What About Anemia?&quot;
      android:textSize=&quot;25dp&quot;
      app:layout_constraintEnd_toEndOf=&quot;parent&quot;
      tools:layout_editor_absoluteY=&quot;128dp&quot; /&gt;
  
  &lt;ImageView
      android:id=&quot;@+id/imageView&quot;
      android:layout_width=&quot;wrap_content&quot;
      android:layout_height=&quot;wrap_content&quot;
      app:srcCompat=&quot;@drawable/secondpage&quot;
      tools:layout_editor_absoluteX=&quot;0dp&quot;
      tools:layout_editor_absoluteY=&quot;128dp&quot; /&gt;
  
  &lt;TextView
      android:id=&quot;@+id/textView2&quot;
      android:layout_width=&quot;347dp&quot;
      android:layout_height=&quot;189dp&quot;
      android:text=&quot;Anemia is defined as a low number of red blood cells. In a routine blood test, anemia is reported as a low hemoglobin or hematocrit. Hemoglobin is the main protein in your red blood cells. It carries oxygen, and delivers it throughout your body. If you have anemia, your hemoglobin level will be low too. If it is low enough, your tissues or organs may not get enough oxygen.&quot;
  
  
  android:textAlignment=&quot;center&quot;
  tools:layout_editor_absoluteX=&quot;32dp&quot;
  tools:layout_editor_absoluteY=&quot;382dp&quot; /&gt;
  
  &lt;TextView
      android:id=&quot;@+id/textView3&quot;
      android:layout_width=&quot;248dp&quot;
      android:layout_height=&quot;56dp&quot;
      android:text=&quot;HOME&quot;
      android:textAlignment=&quot;center&quot;
      android:textSize=&quot;40dp&quot;
  
      tools:layout_editor_absoluteX=&quot;81dp&quot;
      tools:layout_editor_absoluteY=&quot;27dp&quot; /&gt;
  
  &lt;TextView
      android:id=&quot;@+id/textView4&quot;
      android:layout_width=&quot;401dp&quot;
      android:layout_height=&quot;50dp&quot;
      android:text=&quot;What are the symptoms?&quot;
      android:textAlignment=&quot;center&quot;
      android:textSize=&quot;25dp&quot;
      tools:layout_editor_absoluteX=&quot;5dp&quot;
      tools:layout_editor_absoluteY=&quot;571dp&quot; /&gt;
  
  &lt;TextView
      android:id=&quot;@+id/textView5&quot;
      android:layout_width=&quot;413dp&quot;
      android:layout_height=&quot;197dp&quot;
      android:text=&quot;Fatigue. \n Weakness. \n Pale or yellowish skin. \n Irregular heartbeats. \n Shortness of breath. \n Diziness or lightheadedness. \n Chest pain. \n Cold hands and feet.&quot;
      android:textAlignment=&quot;center&quot;
      tools:layout_editor_absoluteX=&quot;0dp&quot;
      tools:layout_editor_absoluteY=&quot;629dp&quot; /&gt;
      &lt;/androidx.constraintlayout.widget.ConstraintLayout&gt;
  </code></pre>
  <p><strong>MainActivity.java</strong></p>
  <pre><code>package com.example.allagainstanemia;
  
  import android.content.Intent;
  import android.os.Bundle;
  import com.google.android.material.snackbar.Snackbar;
  import android.widget.Button;
  import androidx.appcompat.widget.Toolbar;
  import androidx.appcompat.app.AppCompatActivity;
  import android.view.View;
  
  import androidx.navigation.NavController;
  import androidx.navigation.Navigation;
  import androidx.navigation.ui.AppBarConfiguration;
  import androidx.navigation.ui.NavigationUI;
  
  import com.example.allagainstanemia.databinding.ActivityMainBinding;
  
  import android.view.Menu;
  import android.view.MenuItem;
  
  public class MainActivity extends AppCompatActivity {
  
  private AppBarConfiguration appBarConfiguration;
  private ActivityMainBinding binding;
  private Button button2;
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
  
      binding = ActivityMainBinding.inflate(getLayoutInflater());
      setContentView(binding.getRoot());
      this.button2 = (Button) findViewById(R.id.button2);
      button2.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View view) {
              Intent otheractivity = new Intent(getApplicationContext(), Definition.class);
              startActivity(otheractivity);
              finish();
          }
      });
  
  }
  
  @Override
  public boolean onCreateOptionsMenu(Menu menu) {
      // Inflate the menu; this adds items to the action bar if it is present.
      getMenuInflater().inflate(R.menu.menu_main, menu);
      return true;
  }
  
  @Override
  public boolean onOptionsItemSelected(MenuItem item) {
      // Handle action bar item clicks here. The action bar will
      // automatically handle clicks on the Home/Up button, so long
      // as you specify a parent activity in AndroidManifest.xml.
      int id = item.getItemId();
  
      //noinspection SimplifiableIfStatement
      if (id == R.id.action_settings) {
          return true;
      }
  
      return super.onOptionsItemSelected(item);
  }
  
  @Override
  public boolean onSupportNavigateUp() {
      NavController navController = Navigation.findNavController(this, R.id.nav_host_fragment_content_main);
      return NavigationUI.navigateUp(navController, appBarConfiguration)
              || super.onSupportNavigateUp();
  }
  
  }
  </code></pre>
  <p><strong>Picture of my ide result</strong>
  <a href="https://i.stack.imgur.com/CdnE3.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/CdnE3.png" alt="enter image description here" /></a></p>
  <p><strong>Screenshot of the app in my phone</strong></p>
  <p><a href="https://i.stack.imgur.com/BR9Kj.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/BR9Kj.jpg" alt="enter image description here" /></a></p>
  <p><em>Thank you for your time!</em></p>