Hi, 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 an exception Only the original thread that created a thread a view hierarchy can touch its views . how to proceed Thnx in advance ...
A:
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 thread here.
The example should be easy to understand and help you to apply the same concept to your list view.
Josef
2009-06-20 09:31:27
+5
A:
Instead of trying to refresh the view to update the list just take the Adapter object and call the notifyDataSetChanged() API.
Prashast
2009-06-29 05:16:24