title: Android strange layout positioning
body: <p>I have strange issue with layout positioning.
  Here are 2 screens.</p>
  
  <p><img src="https://i.stack.imgur.com/5DUCK.png" alt="enter image description here"></p>
  
  <p><img src="https://i.stack.imgur.com/wDQjR.png" alt="enter image description here"></p>
  
  <p>As you can see on first screenCapture elements takes 2 line.
  The difference in xml layout between is <code>android:layout_marginRight="10dp"</code> on first image and <code>android:paddingRight="10dp"</code> on the second image.</p>
  
  <pre><code>&lt;RelativeLayout
      android:layout_width="match_parent"
      android:layout_height="48dp"&gt;
  
  &lt;RelativeLayout
      android:id="@+id/rl_event_date_and_time"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_centerVertical="true"
      android:layout_marginLeft="10dp"
      android:background="@drawable/date_time_left"&gt;
  
      &lt;ImageView
          android:id="@+id/iv_date"
          android:layout_width="9dp"
          android:layout_height="10dp"
          android:layout_centerVertical="true"
          android:layout_marginLeft="12dp"
          android:background="@drawable/ic_event_date" /&gt;
  
      &lt;TextView
          android:id="@+id/tv_event_date"
          fontPath="fonts/Roboto-Medium.ttf"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_centerVertical="true"
          android:layout_marginLeft="6dp"
          android:layout_toRightOf="@id/iv_date"
          android:textColor="@color/white"
          android:textSize="15sp"/&gt;
  
      &lt;ImageView
          android:id="@+id/iv_time"
          android:layout_width="13dp"
          android:layout_height="13dp"
          android:layout_centerVertical="true"
          android:layout_marginLeft="9dp"
          android:layout_toRightOf="@id/tv_event_date"
          android:background="@drawable/ic_event_time" /&gt;
  
      &lt;TextView
          android:id="@+id/tv_event_time"
          fontPath="fonts/Roboto-Medium.ttf"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_centerVertical="true"
          android:layout_marginLeft="4dp"
          android:paddingRight="10dp" // Here is difference
          android:layout_toRightOf="@id/iv_time"
          android:textColor="@color/white"
          android:textSize="15sp"/&gt;
  
  &lt;/RelativeLayout&gt;
  
      &lt;Button
          android:id="@+id/btn_event_remind"
          style="@style/MaterialButtonBorderLess"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_alignParentRight="true"
          android:layout_centerVertical="true"
          android:layout_marginRight="2dp"
          android:text="@string/event_remind"
          android:visibility="gone"/&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>One more strange thing is that on screen resolution 768 x 1280 - everything is fine. But on 720 x 1280 - only padding works correctly.</p>
  
  <p>So, i am interesting why does it happening, and what should i do to prevent this.</p>
  
  <p>ADDITION</p>
  
  <p>If I use </p>
  
  <pre><code>android:layout_marginRight="10dp"
  android:singleLine="true"
  </code></pre>
  
  <p>The effect is next:</p>
  
  <p><img src="https://i.stack.imgur.com/J8QQD.png" alt="enter image description here"></p>