title: In XML how to align two elements (or widgets) to the right w/ Relative Layout?
body: <p>Lets say you have two buttons side by side under Relative Layout like</p>
  
  <pre><code>&lt;Button
      android:id="@+id/arrow_up"
      android:layout_width="40dp"
      android:layout_height="40dp" /&gt;
  
  &lt;Button
      android:id="@+id/arrow_down"
      android:layout_width="40dp"
      android:layout_height="40dp" /&gt; 
  </code></pre>
  
  <p>I have tried adding the attribute android:layout_alignParentRight="true" to both and there are major issues. First, if you add it to button 1 (id:arrow_up) and not to button 2 (id:arrow_down), the second button disappears because button 1 moves all the way to the right. Second, if you add it to button 2 and not button 1, then button 2 will be stretched until it reaches all the way to the right side and ignores all and any width values (40dp as in this example). Third, if you add it to both, the result is as described when you have the alightParentRight attribute under button 1 and not button 2.</p>
  
  <p>So how is this done? How to align both buttons to the right, side by side and maintain the proper assigned width values?</p>