title: How to disable click listener on image view android
body: <p>I am working on android application in which i am making click listener on image view. I just want to disable image listener, for example i have a edit button , without clicking edit button image view listener should be disabled. </p>
  
  <pre><code>image = (ImageView) findViewById(R.id.image);
  
  editText.setOnClickListener(new View.OnClickListener() {
  
              @Override
              public void onClick(View v) {
                  if (clickCount == 0) {
                      Toast.makeText(getApplicationContext(), "Enabled",
                              Toast.LENGTH_SHORT).show();
                      fName.setEnabled(true);
                      lName.setEnabled(true);
                      mailText.setEnabled(true);
                      mobileText.setEnabled(true);
                      mCond.setEnabled(true);
                      mNotes.setEnabled(true);
                      medication.setEnabled(true);
                      alReact.setEnabled(true);
                      dofo.setEnabled(true);
                      image.setEnabled(true);
                      editText.setText("Done");
                      clickCount = 1;
  
                  }
  
                  else if (clickCount == 1) {
                      Toast.makeText(getApplicationContext(), "Done",
                              Toast.LENGTH_SHORT).show();
                      fName.setEnabled(false);
                      lName.setEnabled(false);
                      mailText.setEnabled(false);
                      mobileText.setEnabled(false);
                      meond.setEnabled(false);
                      mNotes.setEnabled(false);
                      meation.setEnabled(false);
                      alReact.setEnabled(false);
                      doInfo.setEnabled(false);
                      image.setEnabled(false);
                      editText.setText("Edit");
                      updatingUser();
                      clickCount = 0;
                  }
              }
          });
  </code></pre>