I have a thrad that calls a function that populates a list in an activity, I would put a progressDialog when the function is running, I wonder what I do to change the progress dialog is invoked when the activity is called, follows current code :
new Thread(){
public void run() {
runOnUiThread(new Runnable() {
@Override
public void run() {
loadList();
}
});
}
}.start();
I think you would be better off using an AsyncTask, easy to attach a progress dialog to this.
Here’s an example: http://droidapp.co.uk/?p=177