title: How can I fix the button alignment to have same appearance in different screens
body: <p>I've the below layout, but the buttons I made in a line are not represented properly from a screen to another:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
                xmlns:card_view="http://schemas.android.com/apk/res-auto"
                android:orientation="vertical"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_margin="8dp"&gt;
  
      &lt;Spinner/&gt;
      &lt;EditText/&gt;
  
      &lt;LinearLayout android:orientation="horizontal"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"&gt;
              &lt;Button
                      android:text="Update notes"
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content"
                      android:layout_alignParentLeft="true"
                      android:id="@+id/button" android:layout_marginLeft="-8dp"/&gt;
          &lt;ImageButton
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content" card_view:srcCompat="@android:drawable/sym_action_call"
                  android:id="@+id/dialBtn"/&gt;
  
          &lt;ImageButton
                      android:layout_centerInParent="true"
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content" card_view:srcCompat="@android:drawable/ic_menu_mylocation"
                      android:id="@+id/locationBtn"/&gt;
          &lt;ImageButton
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content" card_view:srcCompat="@android:drawable/ic_menu_send"
                  android:id="@+id/whasappBtn"/&gt;
  
              &lt;Button
              android:text="Set Alarm"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_alignParentRight="true"
              android:id="@+id/alarmBtn"/&gt;
  
      &lt;/LinearLayout&gt;
  
      &lt;TextView /&gt;
      &lt;TextView /&gt;
      &lt;TextView /&gt;
      &lt;Button /&gt;
      &lt;ImageView /&gt;
  &lt;/LinearLayout&gt;
  
  </code></pre>
  
  <p>The button to the right <code>set alarm</code> is not coming correctly depending on screen size/resolution:</p>
  
  <p>Correct layout:</p>
  
  <p><a href="https://i.stack.imgur.com/uK8W6.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/uK8W6.png" alt="correct layout"></a></p>
  
  <p>Wrong layout:</p>
  
  <p><a href="https://i.stack.imgur.com/pazKf.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/pazKf.png" alt="wrong layout"></a></p>