How do I delete an item from my custom base adapter?
You do not delete from the adapter ! You delete from the items ! and the adapter is between your items and the view. From the view you can get the position and according the position you can delete items. Then the adapter will refresh you views.
That means you need to do something like this
items.remove(position);
adapter.notifyDataSetChanged()
To delete, you'll need to do 2 things:
- Call
.remove()
on your ArrayList (items). - Call
.notifyDataSetChanged()
on the instance of yourMyListAdapter
class (mListAdapter
).