Issue
I need to updating hundred of records in doInBackground of AsyncTask. I want to update my listview at each 10 records. But we cannot call notifyDataSetChanged in doInBackground. So there are anyway to call notifyDataSetChanged in doInBackground?
I'm thinking about register a BroadcastReceiver. We send an Intent when finish each 10 records in doInBackground and notifyDataSetChanged will be called in BroadcastReceiver? Any suggestion?
Solution
That's exactly what onProgressUpdate is for - updating the UI (usually several times) during the task execution. You should notify the adapter there.
Answered By - alex.zherdev
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.