title: Customise Textview of included layout
body: <p>I have a layout as follows:</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="wrap_content"
      android:layout_height="wrap_content"&gt;
  
      &lt;RelativeLayout
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"&gt;
          &lt;ImageView
              android:id="@+id/logo"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content" /&gt;
          &lt;ImageView
              android:id="@+id/logo_background"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:background="@drawable/logos_background"&gt;
          &lt;/ImageView&gt;
  
          &lt;RelativeLayout
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_centerHorizontal="true"
              android:layout_marginBottom="5dp"
              android:layout_alignBottom="@+id/logo_background"
              &gt;
              &lt;TextView
                  android:id="@+id/logoDetails"
                  android:text="Test Logo details"
                  android:textSize="15sp"
                  android:layout_centerHorizontal="true"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  /&gt;
              &lt;TextView
                  android:id="@+id/stockQuantity"
                  android:layout_centerHorizontal="true"
                  android:textSize="20sp"
                  android:layout_below="@+id/logoDetails"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"    
                  android:text="x10"/&gt;
  
          &lt;/RelativeLayout&gt;
      &lt;/RelativeLayout&gt;    
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>I need to include this layout multiple times in another layout which I have done as follows:</p>
  
  <pre><code>&lt;HorizontalScrollView
      android:layout_below = "@+id/selectLayout"
      android:id="@+id/pager"
      android:scrollbars="none"
      android:layout_marginLeft="10dp"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"&gt;
      &lt;LinearLayout
          android:orientation="horizontal"
          android:layout_marginTop="20dp"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"&gt;
  
          &lt;include layout="@layout/viewpager_item_layout"/&gt;
          &lt;include layout="@layout/viewpager_item_layout"/&gt;
          &lt;include layout="@layout/viewpager_item_layout"/&gt;
          &lt;include layout="@layout/viewpager_item_layout"/&gt;
          &lt;include layout="@layout/viewpager_item_layout"/&gt;
          &lt;include layout="@layout/viewpager_item_layout"/&gt;
          &lt;include layout="@layout/viewpager_item_layout"/&gt;
      &lt;/LinearLayout&gt;
  &lt;/HorizontalScrollView&gt;
  </code></pre>
  
  <p>This gives the the following result:
  <img src="https://i.stack.imgur.com/zKbwh.png" alt="enter image description here"></p>
  
  <p>The problem is I need to access the text views and image views in each <code>&lt;include&gt;</code>.  So the logo image will be different the test logo details will be different and the 'x10' will be different for each one as I hope to populate them from a database.  Could anyone shine a light on this?</p>
  
  <p>It had been my intention to use a view pager for this but that doesn't work as it takes up the whole width and height of the screen.</p>