When using a AsyncTaskLoader how would you update a progressbar showing the status as it is being updated? Normally you wait for the callback to remove when done, but how to do
I'm using this with my AsyncTaskLoader
, inside of loadInBackground
runOnUiThread(new Runnable() {
public void run() {
//UI code
}
});
However, this doesn't work with an configuration change (like orientation change). I'm not convinced AsyncTaskLoader
is the best to use if you need to update the UI, but it works best when handling configuration changes. I don't know why they created both an AsyncTaskLoader
and an AsyncTask
each with their own tradeoffs. Just frustrates and confuses developers. On top of that AsyncTaskLoader
has very little documentation.