How to define which ListView have been clicked?
<p>I have been developing Android application which has 3 ListView and one ContextMenu for each view:</p>

<p>@Override
public void onCreateContextMenu(ContextMenu menu, View view, ContextMenuInfo info) {</p>

<pre><code>menu.add(Menu.NONE, CONTEXT_MENU_ITEM_DELETE, Menu.NONE, "Delete");
super.onCreateContextMenu(menu, view, info);
</code></pre>

<p>}</p>

<p>Registration for click catching:</p>

<pre><code>this.registerForContextMenu(mFirstCategory);    
this.registerForContextMenu(mSecondCategory);
this.registerForContextMenu(mMainCategory);
</code></pre>

<p>mFirstCategory, mSecondCategory, mMainCategory are ListViews. Also I have method for getting row clicked:</p>

<p>@Override
public boolean onContextItemSelected(MenuItem item) {</p>

<pre><code>AdapterContextMenuInfo info=(AdapterContextMenuInfo)item.getMenuInfo();
String name = null;
switch (info.targetView.getId()) {

case (R.id.listViewFirst): name="First";
case (R.id.listViewSecond): name="Second";
case (R.id.listViewMain): name="Main";

}

Toast.makeText(this, name+"_"+String.valueOf(info.position), Toast.LENGTH_LONG).show();

return super.onContextItemSelected(item);
</code></pre>

<p>}</p>

<p>I need to define position (row) clicked of ListView and ListView clicked. My "switch/case" block doesn't work. Please, tell me, how can I do my need? </p>
