I have a layout as follows:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<ImageView
android:id="@+id/logo"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<ImageView
android:id="@+id/logo_background"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/logos_background">
</ImageView>
<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"
>
<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"
/>
<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"/>
</RelativeLayout>
</RelativeLayout>
</RelativeLayout>
I need to include this layout several times in another layout, which I did as follows:
<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">
<LinearLayout
android:orientation="horizontal"
android:layout_marginTop="20dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<include layout="@layout/viewpager_item_layout"/>
<include layout="@layout/viewpager_item_layout"/>
<include layout="@layout/viewpager_item_layout"/>
<include layout="@layout/viewpager_item_layout"/>
<include layout="@layout/viewpager_item_layout"/>
<include layout="@layout/viewpager_item_layout"/>
<include layout="@layout/viewpager_item_layout"/>
</LinearLayout>
</HorizontalScrollView>
This gives the following result:

The problem is that I need to access text representations and image representations in each <include>. Thus, the image of the logo will be different, the data of the test logo will be different, and the "x10" will be different for each of them, since I hope to fill them out from the database. Can anyone shed some light on this?
It was my intention to use the view pager for this, but this does not work as it takes up the entire width and height of the screen.