There is a ListView and a custom adapter Fundapter and custom markup for list items:
<FrameLayout android:layout_width="match_parent" android:layout_height="wrap_content"> <ImageView android:layout_width="match_parent" android:id="@+id/ivPhotoAfter" android:layout_gravity="bottom" android:scaleType="centerCrop" android:layout_height="324dp" /> <LinearLayout android:orientation="horizontal" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="bottom" android:background="@color/black_overlay"> <TextView android:text="" tools:text="Наименование проекта" android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/tvProjectName" android:layout_weight="1" android:textColor="@color/White" android:layout_margin="5dp"/> </LinearLayout> </FrameLayout> <RelativeLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal" android:layout_margin="5dp" android:id="@+id/rlProjectInfo"> <ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" app:srcCompat="@drawable/ic_thumb_up" android:layout_centerVertical="true" android:layout_alignParentLeft="true" android:layout_alignParentStart="true" android:layout_marginLeft="5dp" android:layout_marginStart="5dp" android:id="@+id/ivThumbUp" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerVertical="true" android:layout_marginLeft="5dp" android:layout_marginStart="5dp" android:layout_toRightOf="@+id/ivThumbUp" android:text="Нет голосов" android:id="@+id/tvVotesLike"/> <ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" app:srcCompat="@drawable/ic_thumb_down" android:layout_centerVertical="true" android:layout_marginLeft="5dp" android:layout_marginStart="5dp" android:layout_toRightOf="@+id/tvVotesLike" android:id="@+id/ivThumbDown" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerVertical="true" android:layout_marginLeft="5dp" android:layout_marginStart="5dp" android:layout_toRightOf="@+id/ivThumbDown" android:text="Нет голосов" android:id="@+id/tvVotesDisLike"/> <ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" app:srcCompat="@drawable/ic_menu_share" android:layout_centerVertical="true" android:layout_marginLeft="5dp" android:layout_marginStart="5dp" android:layout_toRightOf="@+id/tvVotesDisLike" android:id="@+id/ivShare" /> </RelativeLayout> <RelativeLayout android:layout_width="match_parent" android:orientation="horizontal" android:layout_margin="5dp" android:id="@+id/rlProjectResponse" android:layout_height="wrap_content"> <ImageView android:layout_width="?attr/actionBarSize" android:layout_height="?attr/actionBarSize" android:scaleType="centerCrop" app:srcCompat="@drawable/noavatar" android:layout_alignParentLeft="true" android:layout_alignParentStart="true" android:id="@+id/ivAuthorPhoto" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="5dp" android:layout_marginStart="5dp" android:layout_toRightOf="@+id/ivAuthorPhoto" android:id="@+id/tvShowResponse" android:textColor="@color/secondary_text" android:clickable="true" android:maxLines="2" /> <ImageView android:layout_width="10dp" android:layout_height="10dp" android:scaleType="fitXY" app:srcCompat="@drawable/expand_arrow" android:layout_below="@+id/tvShowResponse" android:layout_centerHorizontal="true" android:id="@+id/ivExpand" /> </RelativeLayout> . To bind, Fundapter uses its BindDictionary, which allows you to hang a listener on any view inside list items by simply appending onClick
dict.addBaseField(R.id.ivThumbUp).onClick(new ItemClickListener<response>() { @Override public void onClick(response item, int position, View view) { } }); By clicking on ivThumbUp, you need to assign a certain tvVotesLike value. How to get a link to tvVotesLike inside the onClick listener?