I have a list view connected to a database, showing a all the entries. I want a menu to show up if the user long clicks a item in the listview(database entry), showing optio
Instead of using onItemLongClick
you can use
public void onCreateContextMenu(final ContextMenu menu,
final View v, final ContextMenuInfo menuInfo) {
...
}
where you setup the options for edit and delete or whatever you need to.
The actions for the item selected from the context menu can be processed in
public boolean onContextItemSelected(final MenuItem item)
For more information on context menu see here.
For a step by step tutorial visit here.