@Override
public boolean onContextItemSelected(MenuItem item) {
// TODO Auto-generated method stub
AdapterContextMenuInfo acmi = (AdapterContextMenuInfo)
item.getMenuInfo();
long clickedId = acmi.id;
}
In the above case, clickedId is the id of the row that was long-
pressed to bring up the context menu. You can also get a specific view
in the row that was long pressed...
TextView tv = (TextView)acmi.targetView.findViewById
(R.id.some_view_inside_your_row_view)
Take a look at the docs for AdapterContextMenuInfo for more info.
On Nov 25, 1:15 pm, Protocol-X <[EMAIL PROTECTED]> wrote:
> How do u the row id or position of a listactiviy when using a context
> menu. It always seems to always select 0 for the row id.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---