@Override
public boolean onContextItemSelected(MenuItem item) {
if(item.getTitle()=="Remove"){
AdapterContextMenuInfo info = (AdapterContextMenuInfo) item.getMenuInfo();
quotesAdapter.remove(quotes.get((int)info.id));
quotesAdapter.notifyDataSetChanged();
listView.setAdapter(quotesAdapter);
serializeQuotes();
}
else {
return false;
}
return true;
}
Doesn't do anything. If I add
this.quotesAdapter = new QuoteAdapter(this, R.layout.mainrow, quotes);
Removal works, but I don't think is the right way of doing things. I'm not sure what is wrong?