I am trying to subclass the android.os.AsyncTask class generically. I basically just want to add a property to it. The thing is, I still want to be able to use it as an anonymous class.
import android.content.Context;
import android.os.AsyncTask;
public class KAsyncTask extends AsyncTask<Params, Progress, Result> {
public Context c;
}
I have tried subclassing it, but I just can't wrap it around my head how I am supposed to do this.
Regards, EZFrag
You mean you still want it to be an abstract template class like AsyncTask? The declaration would be:
public abstract class KAsyncTask<Params, Progress, Result> extends AsyncTask<Params, Progress, Result> {
public Context c;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With