Reputation: 29
I have a list of students that I display in an adapter
that I create in the class MyCustomAdapter.
Here is the class ManageSection where I call the adapter.
Upvotes: 1
Views: 129
Reputation: 56925
You need to delete record from your list which you pass to your custom dapter adapter(i think studentList is your list) and call notifyDataSetChanged()
Method.
Edit :
if (stdel == false)
{
Toast.makeText(getContext(), "Error deleting student, Please try again",
Toast.LENGTH_LONG).show();
}
if(stdel==true)
{
notifyDataSetChanged();
}
Upvotes: 1
Reputation: 5591
use adapter.notifyDatsetChanged();
see this answer too
see this doc
Upvotes: 0
Reputation: 810
you will have to call notifyDataSetChanged() method of adapater. It will refresh the whole list.Try It.!
Upvotes: 1