Skip to content

Instantly share code, notes, and snippets.

@jbrechtel
Created April 8, 2011 23:24
Show Gist options
  • Save jbrechtel/910924 to your computer and use it in GitHub Desktop.
Save jbrechtel/910924 to your computer and use it in GitHub Desktop.
package com.foo.bar;
import android.os.AsyncTask;
public class LoadDrawingContentTask extends SimpleTask {
private final Location location;
public LoadDrawingContentTask(Location myLocation) {
this.location = myLocation;
}
@Override
protected Boolean background() {
//do some long running task here, probably even show a progress dialog
//store the results in another field in this class
return true;
}
@Override
protected void foreground() {
//update the UI with the results
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment