Last active
September 23, 2015 18:45
-
-
Save gogo40/b4d8809fcf7c113c1858 to your computer and use it in GitHub Desktop.
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
AsyncTask<ResultType> task = new AsyncTask<>(); | |
task | |
.setTask(new Task() { | |
void run() { | |
doSomething(); | |
} | |
}) | |
.setResultListener(new ResultListener<ResultType>() { | |
void onResult(ResultType v) { | |
processResult(v); | |
} | |
}) | |
.setErrorListener(new ErrorListener<Exception>() { | |
void onException(Exception e) { | |
processException(e); | |
} | |
}); | |
task.start(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment