code: public void onItemClick() {
          if (selected) {
              selected = false;
              getView().reset();
  
              if (onResetCommand != null) {
                  onResetCommand.execute();
              }
          }
          else {
              selected = true;
              getView().select();
  
              if (onSelectCommand != null) {
                  onSelectCommand.execute();
              }
          }
      }
docs: View notifications