All Downloads are FREE. Search and download functionalities are using the official Maven repository.

guru.nidi.android.support.ActivityAsyncTask Maven / Gradle / Ivy

There is a newer version: 1.1.5
Show newest version
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);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy