title: Android RelativeLayout alignTop doesn't work
body: <p>I'm trying to use alignTop attribute in a RelativeLayout in order to set a text to right of a profile picture - aligned to picture's top.</p>
  
  <p>This is my layout:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;!-- Home fragment layout --&gt;
  &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:app="http://schemas.android.com/apk/res/com.coapps.pico"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:background="@color/background_dark_green"
      android:orientation="vertical" &gt;
  
      &lt;!-- title layout --&gt;
  
      &lt;RelativeLayout
          android:id="@+id/relativeLayout1"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:background="@drawable/background_fragment_title" &gt;
  
          &lt;!-- profile picture --&gt;
  
          &lt;ImageView
              android:id="@+id/fragment_home_profile_picture"
              android:layout_width="100dp"
              android:layout_height="100dp"
              android:layout_centerVertical="true"
              android:layout_marginLeft="10dp"
              android:background="@drawable/background_profile_picture"
              android:contentDescription="@string/app_name"
              android:scaleType="fitXY"
              android:src="@drawable/test_pic" /&gt;
  
          &lt;!-- user name --&gt;
  
          &lt;TextView
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_alignTop="@+id/fragment_home_profile_picture"
              android:layout_marginLeft="10dp"
              android:layout_toRightOf="@+id/fragment_home_profile_picture"
              android:gravity="top"
              android:text="Roi Mozer"
              android:textColor="@android:color/white"
              android:textSize="30sp"/&gt;
  
      &lt;/RelativeLayout&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>This is how it looks in the preview (and the same in the phone):</p>
  
  <p>As you can see the name center is aligned to picture's top - don't know why..
  <img src="https://i.stack.imgur.com/f5Rhu.png" alt="enter image description here"></p>
  
  <p><strong>How can i set them both to be in the same line ?</strong></p>
  
  <p><strong>UPDATE:</strong>
  When i changed the layout height to a given height (and not wrap content) it does work...</p>