ribot/easy-adapter

On Item Click listener

Zapnologica opened this issue · 1 comments

How would one pass a onClickListener to the adapter for when the View (parent) or entire ViewHolder is selected.

In your example you only show how to add a onClickListener to a button within the View Holder.

I want to know when a user clicks on an Item in the recyclerView and have the item Passed through to the onclick event.

ivacf commented

You should set the click listener on the top level view of the item. Within the ViewHolder you can do getView().setOnClickListener(...)