Marshal Chen
Marshal Chen

Reputation: 2005

How to refresh Expandable Listview's groupview

I want to achieve a function of when I click the group the activity will do something background and when it has finished ,I want the groupview has something different.So I want to know how to fresh the groupview.

Upvotes: 0

Views: 300

Answers (1)

Prateek
Prateek

Reputation: 4013

Well you better post some code to get the right advice on your issue but based on the text inside your question I can suggest these steps,

  • setOnGroupExpandListener(new OnGroupExpandListener(){..}); on your expandable listview.

You will get onGroupExpand method where you will write your logic to refresh or do whatever you need to do in background in an Asynctask obviously.

  • Once you are done with the background work then inside onPostExecute() of your Asynctask set the adapter again or just call notifydatasetchanged if you have modified the data a bit.

Upvotes: 1

Related Questions