Refresh A View Android
I want to refresh a listview. When I am getting a value from different class I want it to update that to list view. I am creating a thread for refreshing the list but I am getting
Solution 1:
Instead of trying to refresh the view to update the list just take the Adapter object and call the notifyDataSetChanged() API.
Solution 2:
Whenever you work with multiple threads in an Android GUI you should use Handler
s. The Android Dev Guide has a good example of how to use Handler
s with a ProgressDialog
when you expand the subsection Example ProgressDialog with a second threadhere.
The example should be easy to understand and help you to apply the same concept to your list view.
Post a Comment for "Refresh A View Android"