guru.nidi.android.support.ActivityAsyncTask Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of android-goodies Show documentation
Show all versions of android-goodies Show documentation
Helpers and utils for android development
package guru.nidi.android.support;
import android.app.Activity;
import android.os.AsyncTask;
/**
*
*/
public abstract class ActivityAsyncTask extends AsyncTask {
protected final Activity activity;
protected ActivityAsyncTask(Activity activity) {
this.activity = activity;
}
@Override
protected void onPreExecute() {
activity.setProgressBarVisibility(true);
}
@Override
protected void onPostExecute(Result result) {
afterExecute(result);
activity.setProgressBarVisibility(false);
}
protected abstract void afterExecute(Result result);
}