code: private void setClickListener(View view) {
      if (view.getId() == INVALID) {
        return;
      }
      //adapterview does not support click listener
      if (view instanceof AdapterView) {
        return;
      }
  
      view.setOnClickListener(new View.OnClickListener() {
        @Override public void onClick(View v) {
          if (onClickListener == null) {
            return;
          }
          onClickListener.onClick(DialogPlus.this, v);
        }
      });
    }
docs: It is used to setListener on view that have a valid id associated