title: RelativeLayout View to right of TextView
body: <p>I got following simple Layout. The problem can be reproduced in the android studio designer:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
              android:layout_width="match_parent"
              android:layout_height="match_parent"&gt;
  
  &lt;TextView
      android:id="@+id/x"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_centerVertical="true"
      android:layout_marginEnd="@dimen/margin_small"
      android:layout_marginRight="@dimen/margin_small"
      android:text="@string/long_string"
      android:textAppearance="?android:attr/textAppearanceSmall"/&gt;
  &lt;CheckBox
      android:id="@+id/y"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_toRightOf="@+id/x"
      android:layout_toEndOf="@+id/x"
      android:layout_centerVertical="true" /&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>This layout works fine if the text length of the textview is short. The checkbox is placed on the right of the textview. But if the text gets long and even wraps maybe, then the checkbox is pushed out of the view. It is not visible anymore. I would like that the checkbox is always visible on the right of the textview even, if it fills the whole width of the screen.</p>
  
  <p>I tried to rewrite the layout with a LinearLayout which doesn't work either.</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              android:orientation="horizontal"&gt;
  
  &lt;TextView
      android:id="@+id/x"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_marginEnd="@dimen/margin_small"
      android:layout_marginRight="@dimen/margin_small"
      android:text="@string/long_string"
      android:textAppearance="?android:attr/textAppearanceSmall"/&gt;
  &lt;CheckBox
      android:id="@+id/y"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
     /&gt;
  
   &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>Do you know a trick to to achieve this with relative layout? I would somehow expect this behaviour from relative layout by default. Thanks ;)</p>