code: @Override
      public void onBindViewHolder(final VH vh, final int i) {
          if(itemClickListener != null){
              vh.itemView.setOnClickListener(new View.OnClickListener() {
                  @Override
                  public void onClick(View v) {
                      int position = vh.getAdapterPosition();
                      if (position != RecyclerView.NO_POSITION) {
                          itemClickListener.onItemClick(v, getItem(position), position);
                      }
                  }
              });
          }
  
          if(itemLongClickListener != null){
              vh.itemView.setOnLongClickListener(new View.OnLongClickListener() {
                  @Override
                  public boolean onLongClick(View v) {
                      int position = vh.getAdapterPosition();
                      if (position != RecyclerView.NO_POSITION) {
                          return itemLongClickListener.onItemLongClick(v, getItem(position), position);
                      }
                      return false;
                  }
              });
          }
      }
docs: Intercept the bind View holder method to wire up the item click listener only if
  the listener is set by the user
  
  CAVEAT: Be sure that you still override this method and call it's super (or don't if you want
  to override this functionality and use the {@link #onItemClick(android.view.View, int)} method)
  
  @param vh        the view holder
  @param i         the position being bound