@Override
public void onCreateContextMenu(ContextMenu menu, View v, final ContextMenu.ContextMenuInfo menuInfo) {
MenuItem deletar = menu.add("Deletar");
deletar.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
@Override
public boolean onMenuItemClick(MenuItem item) {
AdapterView.AdapterContextMenuInfo info = (AdapterView.AdapterContextMenuInfo) menuInfo;
Lista lista = (Lista) listaItens.getItemAtPosition(info.position);
Toast.makeText(ListaMainActivity.this, "Deletar Lista! " + lista.getId().toString(), Toast.LENGTH_SHORT).show();
CarregaLista();
return false;
}
});
}
}