Created
July 24, 2012 23:06
-
-
Save forforf/3173248 to your computer and use it in GitHub Desktop.
Android - Callback Task, simple wrapper for pre and post execute
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //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