Skip to content

Instantly share code, notes, and snippets.

@forforf
Created July 24, 2012 23:06
Show Gist options
  • Select an option

  • Save forforf/3173248 to your computer and use it in GitHub Desktop.

Select an option

Save forforf/3173248 to your computer and use it in GitHub Desktop.
Android - Callback Task, simple wrapper for pre and post execute
//Callback Tast
class CallbackTask implements Runnable {
private final Runnable task;
private final Callback callback;
CallbackTask(Runnable task, Callback callback) {
this.task = task;
this.callback = callback;
}
public void run() {
task.run();
callback.complete();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment