Android studio search results view : <p>I have search and results activities. After submitting a search, webserver is contacted and i will get json array as a result. Each object in that array will contain few info pairs about that result.
I've made view design for results but i don't know how to copy and re-use that view for all search results, creating one text view for results would be simple, but what to do with this complicated layout?
This is code of view i want to copy and use for each result...
Also, i want results to be clickable and when clicked to be taken to details page where more details about that should be shown, so second question is how to keep track of what have user clicked (btw. i know ID's are messed up, i will set them later)</p>

<pre><code>&lt;LinearLayout
            android:orientation="horizontal"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center_vertical|center_horizontal"
            android:layout_marginTop="10dp"
            android:id="@+id/result"
            android:paddingLeft="15dp"
            android:paddingRight="15dp"
            android:paddingTop="10dp"
            android:paddingBottom="10dp"
            android:background="@drawable/background_border"
            android:onClick="ShowDetails"&gt;

            &lt;ImageView
                app:srcCompat="@drawable/golettaverde"
                android:id="@+id/imageView2"
                android:layout_weight="1"
                android:background="@drawable/image_background_border"
                android:scaleType="fitXY"
                android:layout_width="120dp"
                android:layout_height="120dp" /&gt;

            &lt;LinearLayout
                android:orientation="vertical"
                android:layout_width="wrap_content"
                android:layout_height="match_parent"
                android:layout_weight="1"
                android:layout_marginLeft="5dp"
                android:gravity="center_vertical|center_horizontal"&gt;

                &lt;TextView
                    android:text="Goletta Verde"
                    android:layout_width="wrap_content"
                    android:id="@+id/textView5"
                    android:layout_weight="1"
                    android:textColor="?attr/colorButtonNormal"
                    android:textStyle="normal|bold"
                    android:textSize="26sp"
                    android:layout_height="10dp" /&gt;

                &lt;TextView
                    android:text="5 seats - 18.60 meters"
                    android:layout_width="wrap_content"
                    android:id="@+id/textView6"
                    android:layout_weight="1"
                    android:textColor="?attr/colorButtonNormal"
                    android:textSize="20sp"
                    android:layout_marginLeft="3dp"
                    android:layout_height="7dp" /&gt;

                &lt;TextView
                    android:text="Year 2009"
                    android:layout_width="wrap_content"
                    android:id="@+id/textView7"
                    android:layout_weight="1"
                    android:textSize="20sp"
                    android:textColor="?attr/colorButtonNormal"
                    android:layout_marginLeft="3dp"
                    android:layout_height="7dp" /&gt;

                &lt;LinearLayout
                    android:orientation="horizontal"
                    android:layout_width="wrap_content"
                    android:layout_height="10dp"
                    android:layout_weight="1"&gt;

                    &lt;ImageView
                        app:srcCompat="@android:drawable/btn_star_big_on"
                        android:id="@+id/imageView3"
                        android:layout_weight="1"
                        android:layout_width="30dp"
                        android:layout_height="wrap_content" /&gt;
                    &lt;ImageView
                        app:srcCompat="@android:drawable/btn_star_big_on"
                        android:id="@+id/imageView3"
                        android:layout_weight="1"
                        android:layout_width="30dp"
                        android:layout_height="wrap_content" /&gt;
                    &lt;ImageView
                        app:srcCompat="@android:drawable/btn_star_big_on"
                        android:id="@+id/imageView3"
                        android:layout_weight="1"
                        android:layout_width="30dp"
                        android:layout_height="wrap_content" /&gt;
                    &lt;ImageView
                        app:srcCompat="@android:drawable/btn_star_big_on"
                        android:id="@+id/imageView3"
                        android:layout_weight="1"
                        android:layout_width="30dp"
                        android:layout_height="wrap_content" /&gt;
                    &lt;ImageView
                        app:srcCompat="@android:drawable/btn_star_big_on"
                        android:id="@+id/imageView3"
                        android:layout_weight="1"
                        android:layout_width="30dp"
                        android:layout_height="wrap_content" /&gt;
                &lt;/LinearLayout&gt;

                &lt;TextView
                    android:text="300€"
                    android:layout_width="wrap_content"
                    android:id="@+id/textView7"
                    android:layout_weight="1"
                    android:textSize="24sp"
                    android:textColor="?attr/colorButtonNormal"
                    android:layout_marginLeft="3dp"
                    android:layout_height="7dp"
                    android:textStyle="normal|bold" /&gt;
</code></pre>
