title: android relativelayout, a mess
body: <p>In the editor, the buttons are lined up like how it should be, but when in the actual device the buttons are messed up. Why is this so?</p>
  
  <p><a href="https://i.stack.imgur.com/FTon6.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/FTon6.png" alt="enter image description here"></a></p>
  
  <p><a href="https://i.stack.imgur.com/ApAYC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ApAYC.png" alt="enter image description here"></a></p>
  
  <p><a href="https://i.stack.imgur.com/nYpB7.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/nYpB7.png" alt="enter image description here"></a>
  Here is the fxml file for the navbar, it uses a Relative 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:app="http://schemas.android.com/apk/res-auto"
      android:layout_width="match_parent" android:layout_height="match_parent"&gt;
  
      &lt;ImageView
          android:id="@+id/imageView4"
          android:layout_width="match_parent"
          android:layout_height="65dp"
          android:layout_alignParentStart="true"
          android:layout_alignParentTop="true"
          android:adjustViewBounds="false"
          android:cropToPadding="false"
          app:srcCompat="@drawable/navbar" /&gt;
  
      &lt;Button
          android:id="@+id/homeBtn"
          android:layout_width="45dp"
          android:layout_height="45dp"
          android:layout_centerInParent="@+id/imageView4"
          android:layout_alignTop="@+id/imageView4"
          android:layout_marginTop="6dp"
          android:layout_marginStart="30dp"
          android:background="@drawable/home_icon" /&gt;
  
      &lt;Button
          android:id="@+id/optionsBtn"
          android:layout_width="45dp"
          android:layout_height="45dp"
          android:layout_centerInParent="@+id/imageView4"
          android:layout_alignTop="@+id/imageView4"
          android:layout_marginTop="6dp"
          android:layout_marginStart="100dp"
          android:background="@drawable/options_icon" /&gt;
  
      &lt;Button
          android:id="@+id/micBtn"
          android:layout_width="45dp"
          android:layout_height="45dp"
          android:layout_alignTop="@+id/homeBtn"
          android:layout_centerHorizontal="true"
          android:background="@drawable/mic_icon" /&gt;
  
      &lt;Button
          android:id="@+id/connectionBtn"
          android:layout_width="45dp"
          android:layout_height="45dp"
          android:layout_centerInParent="@+id/imageView4"
          android:layout_alignTop="@+id/imageView4"
          android:layout_marginTop="6dp"
          android:layout_marginStart="240dp"
          android:background="@drawable/con_icon" /&gt;
  
      &lt;Button
          android:id="@+id/aboutBtn"
          android:layout_width="45dp"
          android:layout_height="45dp"
          android:layout_centerInParent="@+id/imageView4"
          android:layout_alignTop="@+id/imageView4"
          android:layout_marginTop="6dp"
          android:layout_marginStart="310dp"
          android:background="@drawable/about_icon" /&gt;
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>Kindly please help me, I am new to android and I am still experimenting. No matter how much I change the x positions of the buttons it won't stay in their place when it is already compiled and run on the android, but when on the editor it looks fine. </p>