Skip to content Skip to sidebar Skip to footer

Removing Item From Listview

i have custom list adapter with checkboxes i want to remove list items on checked items . when removing item of listview after coming to this fragment deleted item coming back to

Solution 1:

Follow this answer for directions regarding how to update the adapter if the listview contents has been changed. According to that answer update your adapter as

privateclassCustomListAdapterextendsArrayAdapter<CustomModel> {

    // you adapter code here...publicvoidupdateList(List<CustomModel> list) {

        this.list = list;
        notifyDataSetChanged();

    }

and call it from the activity as yourAdapterInstance.updateList(newListContent)

Post a Comment for "Removing Item From Listview"