How to use ButterKnife OnItemClick with RecyclerView?

Silly Questions picture Silly Questions · Nov 6, 2014 · Viewed 10.5k times · Source

As onItemClick is no more in RecyclerView, does ButterKnife still able to handle its item clicks with @onItemClick or with @onClick annotations?

If not so, any work around to use that?

Answer

Ivan Morgillo picture Ivan Morgillo · Jan 28, 2015

My solution is to use @OnClick inside the ViewHolder. This is the only way to have a clue about which element of the "list item" has been clicked.