RecyclerView
does not have an OnItemClickListener like it's predecessor, ListView
. However, detecting item clicks is pretty simple.
Set an OnClickListener
in your ViewHolder
creation:
private class MyAdapter extends RecyclerView.Adapter<MyAdapter.ViewHolder> {
public static class ViewHolder extends RecyclerView.ViewHolder