jbgamer
jbgamer

Reputation: 118

Setup a listener for listview to listen that is data changed?

I have listviews in viewpages.I used asynctask for loading data from internet to my listview.When i load data in my fragment and set my adapter,my listview doesn't show the data.So i want to listen if data variable changed,so i can reset my adapter.How can i do this?

Upvotes: 2

Views: 3615

Answers (1)

500865
500865

Reputation: 7120

The adapter of your listviews should be notified about the change in data by using listAdapter.notifyDataSetChanged().

You can even try listView.invalidate()

Upvotes: 1

Related Questions