I've got the context menu showing up properly but can't seem to catch
the onclick event on it. I'm guessing I'm missing something fairly
obvious but I'm stumped.. anyone have any ideas?
Code here:
notesCursor = nm.GetAllNotes();
NotesViewAdapter nva = new NotesViewAdapter(this,
R.layout.notes_row,
notesCursor);
setListAdapter(nva);
// add a listener to the default view to handle holding down
// on the screen to view or delete.. default cilck is still
view.
getListView().setOnCreateContextMenuListener(
new OnCreateContextMenuListener() {
@Override
public void
onCreateContextMenu(ContextMenu menu, View v,
ContextMenuInfo
menuInfo) {
menu.add(0, 0, 0, "View
ShackMark");
menu.add(0, 0, 0, "Delete
ShackMark");
}
});
// Add click action
getListView().setOnItemClickListener(new OnItemClickListener() {
@Override
public void onItemClick(AdapterView
parent, View v,
int position, long id) {
// Clicking an item starts
editing it
DeleteShackMark(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
-~----------~----~----~----~------~----~------~--~---