I have created a layout with an ImageView, I want to include it two times with two different ImageView like a ListView with different positions.
this is the ImageView layout
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent"> <include android:layout_width="wrap_content" android:layout_height="wrap_content" layout="@layout/main_guilds_item" android:layout_gravity="center_horizontal" /> <include layout="@layout/main_guilds_item" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_horizontal" /> </LinearLayout> here i include the layout two times but i want to access those ImageViews with different IDs to set different Images.
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent"> <include android:layout_width="wrap_content" android:layout_height="wrap_content" layout="@layout/main_guilds_item" android:layout_gravity="center_horizontal" /> <include layout="@layout/main_guilds_item" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_horizontal" /> </LinearLayout> How can I do it ?