title: Show context menu on imagegridview
body: <p>I'm trying to create a context menu that popsup when I hold my finger (long) on an image in a gridview. </p>
  
  <p>Now In the fragment that creates the gridview I've did this:</p>
  
  <p>OnCreate:</p>
  
  <pre><code>imageGrid.setAdapter(ImageAdapter);
  </code></pre>
  
  <p>Where ImageAdapter is my seperate class that does the work for me.</p>
  
  <p>Also in the same fragment I've got </p>
  
  <pre><code> @Override
      public boolean onContextItemSelected(MenuItem item) {
          if(item.getTitle()=="Action1"){
              Log.d("Debug","Clicked");
          }
          else {
              return false;
          }
          return true;
      }
  
      @Override
      public void onCreateContextMenu(ContextMenu menu, View v,ContextMenu.ContextMenuInfo menuInfo) {
          super.onCreateContextMenu(menu, v, menuInfo);
          menu.setHeaderTitle("Context Menu");
          menu.add(0, v.getId(), 0, "Action 1");
          menu.add(0, v.getId(), 0, "Action 2");
      }
  </code></pre>
  
  <p>Then in my adapter class I registered the longOnclickListener like this:</p>
  
  <pre><code>private class selectOnLongClickListener implements View.OnLongClickListener{
      private ViewHolder mViewHolder;
  
  private selectOnLongClickListener(ViewHolder viewHolder)
  {
      mViewHolder = viewHolder;
  }
  
  @Override
  public boolean onLongClick(View v)
  {
      Log.d("Debug","OnLongClick");
      return true;
  }
  
  }
  </code></pre>
  
  <p>The listener works, he prints me the debug output when I hold my finger long on an image. But the context menu never shows. Am I doing something wrong?</p>