title: Why is there an empty space on the right of my RelativeLayout?
body: <p>I have two identical, equally-sized RelativeLayouts with some text and an image that I want to be aligned to the right side. However, there seems to be some sort of padding that doesn't let me put it on the right, even though I never specified this. </p>
  
  <p><img src="https://i.stack.imgur.com/jIr6i.png" alt="enter image description here"></p>
  
  <p>Here is my code:</p>
  
  <pre><code>&lt;LinearLayout
      android:baselineAligned="false"
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      android:orientation="horizontal"&gt;
  
      &lt;RelativeLayout
          android:id="@+id/my_relativelayout"
          android:background="@drawable/my_background"
          android:layout_weight="1"
          android:layout_width="0dp"
          android:layout_height="wrap_content"
          android:gravity="right"&gt;
          &lt;TextView
              android:id="@+id/my_textview"
              android:textAppearance="?android:attr/textAppearanceButton"
              android:layout_centerVertical="true"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"&gt;
          &lt;/TextView&gt;
          &lt;ImageView
              android:id="@+id/my_imageview"
              android:layout_centerVertical="true"
              android:scaleType="center"
              android:src="@drawable/my_image"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_toRightOf="@id/my_textview"&gt;
          &lt;/ImageView&gt;
      &lt;/RelativeLayout&gt;
  
      &lt;RelativeLayout
          ... same thing here ...&gt;
      &lt;/RelativeLayout&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p><strong>Edit: The empty space IS NOT the other RelativeLayout. The other RelativeLayout is another "blue rectangle" with text and an image, and is also experiencing the issue of the space on the right side. Like so:</strong></p>
  
  <p><img src="https://i.stack.imgur.com/7aoY2.png" alt="enter image description here"></p>