Skip to content

Instantly share code, notes, and snippets.

View achavhan's full-sized avatar

AMOL CHAVHAN achavhan

View GitHub Profile
@achavhan
achavhan / ItemClickSupport.java
Created September 17, 2016 14:46 — forked from nesquena/ItemClickSupport.java
Click handling for RecyclerView
/*
Source: http://www.littlerobots.nl/blog/Handle-Android-RecyclerView-Clicks/
USAGE:
ItemClickSupport.addTo(mRecyclerView).setOnItemClickListener(new ItemClickSupport.OnItemClickListener() {
@Override
public void onItemClicked(RecyclerView recyclerView, int position, View v) {
// do it
}
});