title: Android ImageView's onClickListener does not work
body: <p>I have an ImageView for which I wanted to implement the onClickListener. But when I click on the image, nothing happens. Event the Logcat does not show any errors.</p>
  
  <p>Following is my import statement:</p>
  
  <pre><code>import android.view.View.OnClickListener;
  </code></pre>
  
  <p>Following is my layout code for the image:</p>
  
  <pre><code>&lt;ImageView android:id="@+id/favorite_icon" 
      android:src="@drawable/small_star"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_gravity="top|right" android:paddingTop="63sp"
      android:paddingRight="2sp"  /&gt;
  </code></pre>
  
  <p>Following is the code in my activity which defines the event handler for onClickListener:</p>
  
  <pre><code>ImageView imgFavorite = (ImageView) findViewById(R.id.favorite_icon);
  imgFavorite.setClickable(true);
  imgFavorite.setOnClickListener(new OnClickListener() {
              @Override
              public void onClick(View v) {
                  Log.i(SystemSettings.APP_TAG + " : " + HomeActivity.class.getName(), "Entered onClick method");
                  Toast.makeText(v.getContext(),
                          "The favorite list would appear on clicking this icon",
                          Toast.LENGTH_LONG).show();
              }
          });
  </code></pre>
  
  <p>Am I missing something. Any help would be appreciated.</p>
  
  <p>Thanks in advance.</p>