You can use the runOnUiThread() method as follows. If you're not using a ListActivity
, just adapt the code to get a reference to your ArrayAdapter
.
final ArrayAdapter adapter = ((ArrayAdapter)getListAdapter());
runOnUiThread(new Runnable() {
public void run() {
adapter.notifyDataSetChanged();
}
});