0

How can I create remove method in list Adapter to remove row of list view and how to use this method in my Activity ?

public void remove(List<contac> contac) {
    list.remove(contac);        
}

In my Activity :

adapter.remove(list.get(i));

but it didn't worked, if I use this

list.remove(i);

worked but after refreshing not changed my list view. then use update method:

public void updateList(List<contac> list) {
    this.list = list;
    notifyDataSetChanged();
}

Again it didn't work. Any ideas ?

www0z0k
  • 4,444
  • 3
  • 27
  • 32
mohsen
  • 1
  • 3

0 Answers0