Add/remove Items To Android Listview
I am creating a listview as ListView listView = new ListView(context); in my activity and I code MyCustomAdapter that extends BaseAdaptor.setting this custom adapter to my listView
Solution 1:
from your item array just remove or add item and call your adapter's notifyDataSetChanged()
Solution 2:
remove/add an element and use this.
((BaseAdapter) listView.getAdapter()).notifyDataSetInvalidated();
Post a Comment for "Add/remove Items To Android Listview"