Skip to content

Instantly share code, notes, and snippets.

@YkSix
Created March 4, 2017 14:01
Show Gist options
  • Select an option

  • Save YkSix/cf3b68647d3a2eaf1207bce2020533b3 to your computer and use it in GitHub Desktop.

Select an option

Save YkSix/cf3b68647d3a2eaf1207bce2020533b3 to your computer and use it in GitHub Desktop.
The only ItemClickListener you would need.
public interface OnRecyclerViewItemClickListener extends View.OnClickListener {
/**
* @param holder The ViewHolder of the RecyclerView item.
* @param position The position in which the item is clicked.
*/
void onItemClick(ViewHolder holder, int position);
/**
* Note that the ViewHolder can be got by <code>v.getTag(R.id.tag_viewholder)</code>
* or using SimpleOnRecyclerViewItemClickListener#getViewHolder
*/
@Override
void onClick(View v);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment