Chirag thaker
Chirag thaker

Reputation: 331

android - ArrayAdapter not updating, but Sqlite Database updated

I am working on restaurant app. In that, i have cart activity. That, I manage with the database. When the user adds an item, i insert it to a database.

I created one class that extends ArrayAdapter

Problem

adapter.notifyDataSetChanged() not working.

NOTE

when I go back to that activity and come, it will be removed.

Upvotes: 0

Views: 126

Answers (1)

Dixit Panchal
Dixit Panchal

Reputation: 3436

Just remove the item from Arraylist.

yourArraylist.remove(poistion);

Then you notify to adpter changed by below code

adapter.notifyDataSetChanged();

Try this it may help you.....

Upvotes: 1

Related Questions