title: Android RelativeLayout align element on another elements border
body: <p>Im trying to make a text view to align to the left border of another imageview in a RelativeLayout, but I'm having trouble and I cannot achieve this. Can anyone tell me how can I achieve this? </p>
  
  <p><img src="https://i.stack.imgur.com/ZbGCt.png" alt="enter image description here"></p>
  
  <p><img src="https://i.stack.imgur.com/Cmwj3.png" alt="enter image description here"></p>
  
  <p>Here is my current XML layout:</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="fill_parent"
      android:layout_height="wrap_content"
      android:layout_marginBottom="15dp"
      android:orientation="vertical" &gt;
  
      &lt;ImageView
          android:id="@+id/main_item_bg"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_alignParentBottom="true"
          android:contentDescription="@string/app_name"
          android:scaleType="fitXY" /&gt;
  
      &lt;RelativeLayout
          android:id="@+id/linearLayout1"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_alignParentBottom="true"
          android:background="@drawable/blackalha"
          android:gravity="center_vertical"
          android:orientation="horizontal"
          android:weightSum="100" &gt;
  
          &lt;TextView
              android:id="@+id/main_item_cont"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:gravity="center"
              android:layout_centerVertical="true"
              android:layout_toLeftOf="@+id/main_item_nmb"
              android:paddingLeft="5dp"
              android:textAppearance="?android:attr/textAppearanceMedium"
              android:textColor="@android:color/white" /&gt;
  
          &lt;ImageView
              android:id="@+id/main_item_ic"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_alignParentRight="true"
              android:layout_alignParentTop="true"
              android:background="@color/app_purple"
              android:src="@drawable/bacal" /&gt;
  
          &lt;TextView
              android:id="@+id/main_item_nmb"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_centerVertical="true"
              android:layout_toLeftOf="@+id/main_item_ic"
              android:background="@drawable/saric"
              android:gravity="center"
              android:textColor="#333333" /&gt;
  
      &lt;/RelativeLayout&gt;
  
      &lt;TextView
          android:id="@+id/main_item_title"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_alignParentLeft="true"
          android:layout_alignTop="@+id/main_item_bg"
          android:layout_margin="5dp"
          android:maxWidth="200dp"
          android:textAppearance="?android:attr/textAppearanceMedium"
          android:textColor="@android:color/white" /&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>