title: Accessing nested layouts in Android
body: <p>I'm having 3 nested layouts and I'm facing difficulty in accessing the views in them. Main xml(A.xml) below, includes a single instance of B, which has mutiple includes of C.xml. There are 3 images in C.xml</p>
  
  <p>Say </p>
  
  <p><strong>A.xml</strong> -> This is the main xml</p>
  
  <pre><code>  &lt;include
          android:id="@+id/b"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          layout="@layout/B" /&gt;
  </code></pre>
  
  <p><strong>B.xml</strong> -> This is level 2</p>
  
  <pre><code> &lt;include
          android:id="@+id/c1"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          layout="@layout/C" /&gt;
  
      &lt;include
          android:id="@+id/c2"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          layout="@layout/C" /&gt;
  
      &lt;include
          android:id="@+id/c3"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          layout="@layout/C" /&gt;
  </code></pre>
  
  <p><strong>C.xml</strong> - this is level 3</p>
  
  <pre><code>&lt;ImageView
          android:id="@+id/a1"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:src="@drawable/img1" /&gt;
  
      &lt;ImageView
          android:id="@+id/a2"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:src="@drawable/img2" /&gt;
  
      &lt;ImageView
          android:id="@+id/a3"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:src="@drawable/img3" /&gt;
  </code></pre>
  
  <p>So here, main includes one instance on B, which in turn includes multiple instance of C. So if I want to access from B the id C3 and in C3 I want to make a2 visible, how should I go about it.</p>