@ NonNull private View . OnClickListener createItemClickListener ( final int position ) { return new View . OnClickListener ( ) { @ Override public void onClick ( View v ) { setItemChecked ( position , ! isItemChecked ( position ) ) ; if ( itemClickListener != null ) { itemClickListener . onItemClick ( RecyclerViewAdapterWrapper . this , position ) ; } } } ; }
Creates a listener which allows to select a list item when it has been clicked .