Last active
March 5, 2016 03:41
-
-
Save lucasr/e7417474278ca0dd7783 to your computer and use it in GitHub Desktop.
Using ItemClickSupport from TwoWayView
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ItemClickSupport itemClick = ItemClickSupport.addTo(recyclerView); | |
itemclick.setOnItemClickListener(new OnItemClickListener() { | |
@Override | |
public void onItemClick(RecyclerView p, View c, int pos, long id) { | |
... | |
} | |
}); | |
itemClick.setOnItemLongClickListener(new OnItemLongClickListener() { | |
@Override | |
public boolean onItemLongClick(RecyclerView p, View c, int pos, long id) { | |
... | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Would love to see how OnItemClickListener could be implemented as an object. For instance,
itemClick.setOnItemClickListener(myItemClickListener);