AdapterContextMenuInfo is always null
<p>I tried doing this by the book from android dev docs:</p>

<pre><code>// this didn't create a menu, i don't know why
//registerForContextMenu(getListView());

setListAdapter(new ArrayAdapter&lt;Note&gt;(this, R.layout.selectset_listitem) {
    @Override

    protected View getView(...) {
        ... custom layout ...

        // this creates a menu, but...
        registerForContextMenu(convertView);

        return convertView;
    }
}
</code></pre>

<p>And the <code>onCreateContextMenu</code> and <code>onContextItemSelected</code> almost exactly as in <a href="http://developer.android.com/guide/topics/ui/menus.html#context-menu" rel="nofollow">http://developer.android.com/guide/topics/ui/menus.html#context-menu</a>.</p>

<p>here is how it looks in the docs (and my code):</p>

<pre><code>@Override
public void onCreateContextMenu(ContextMenu menu, View v,
                                ContextMenuInfo menuInfo) {
  super.onCreateContextMenu(menu, v, menuInfo);
  MenuInflater inflater = getMenuInflater();
  inflater.inflate(R.menu.context_menu, menu);
}
</code></pre>

<p>but this part always gives me a null info:</p>

<pre><code>public boolean onContextItemSelected(MenuItem item) {
    AdapterContextMenuInfo info = (AdapterContextMenuInfo) item.getMenuInfo();
    ...
}
</code></pre>

<p>The only thing that is really unique is that i've got a custom layout for list items (i.e. a couple of text fields and an image). Is there something i need to do to be able to get the index of the list item that the context menu was built for?</p>
