Android open ContextMenu on short click + pass item clicked details
<pre><code> lv.setOnItemClickListener(new OnItemClickListener() {
             @Override
          public void onItemClick(AdapterView&lt;?&gt; parent, View view, int position, long id) {
              TextView text = (TextView) view.findViewById(R.id.btitle);
              registerForContextMenu(text);
              view.showContextMenu();
              }
            });
       }

     @Override
     public void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo) {
       super.onCreateContextMenu(menu, v, menuInfo);
       TextView text = (TextView) v.findViewById(R.id.btitle);
       CharSequence itemTitle = text.getText();
       menu.setHeaderTitle(itemTitle);

       MenuInflater inflater = getMenuInflater();
       inflater.inflate(R.menu.context_menu, menu);

     }
</code></pre>

<p>Hello,</p>

<p>I'm trying to open a contextMenu on short item click.
I've managed to do so only if I add  registerForContextMenu(getListView()); somewhere but this also triggers contextMenu on long click (which I don't want to happen).</p>

<p>Tried view.showContextMenu() but it doesn't do anything unless i add the registerForContextMenu(getListView()); . tried registering the clicked item first and then call the showContextMenu() but didn't do anything as well...</p>

<p>Also, I want to get the clicked item image + text so I can use them in the contextMenu.</p>

<p>Appreciate the help!</p>
