Answer the question
In order to leave comments, you need to log in
RecycleView. How to understand which part of the item was clicked?
There is a RecycleView. The list item has two TextView and one Image
How to determine which element from this item was clicked (for example, an image)?
inner class holder(itemView: View?) : RecyclerView.ViewHolder(itemView) {
init {
itemView?.setOnClickListener {
//есть it, отвечающий за view
}
}
}
Answer the question
In order to leave comments, you need to log in
I did so
inner class holder(itemView: View?) : RecyclerView.ViewHolder(itemView)
private val play: ImageView? = itemView?.findViewById(R.id.main_vase_rallies_play)
init {
itemView?.setOnClickListener {
println("all view")
}
play?.setOnClickListener {
println("play")
}
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question