title: Reference the id of a view inside an "include" layout in xml
body: <p>I have a button, <code>A</code>, inside <code>special_button.xml</code>, that I reuse on all my activities. Each activity has a root <code>RelativeLayout</code>.</p>
  
  <p>The problem: one of my activities has a button, <code>B</code>, on the same position as <code>A</code>. I decided to just move <code>B</code> above <code>A</code>, but I can't reference <code>A</code> from the activity's xml.</p>
  
  <p>Here are the xmls</p>
  
  <p><strong>special_button.xml</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;merge xmlns:android="http://schemas.android.com/apk/res/android" &gt;
  
      &lt;Button
          android:id="@+id/A"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_alignParentBottom="true"
          android:layout_alignParentRight="true"
          android:layout_marginBottom="15dp"
          android:layout_marginRight="20dp"/&gt;
  
  &lt;/merge&gt;
  </code></pre>
  
  <p><strong>layout_main.xml</strong></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;include layout="@layout/special_button" /&gt;
  
      &lt;Button
          android:id="@+id/B"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_alignParentRight="true"
          android:layout_above="&lt;id to reference button A&gt;"
          android:layout_marginBottom="15dp"
          android:layout_marginRight="20dp" /&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>