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 options to edit or delete the entry. how can i do this.
Till now, I have tried using a onItemLongClick listener and a toast in it showing the id of the view long clicked.
@Override
public boolean onItemLongClick(AdapterView<?> parent, View view,
        int position, long id) {
    String res = Long.toString(id);
     Toast toast = Toast.makeText(this, res, Toast.LENGTH_SHORT);
     toast.show();
    return true;
}