Created
May 27, 2014 17:13
-
-
Save melix/45a62f5c9fc10ff60994 to your computer and use it in GitHub Desktop.
Tired of AsyncTask in Android?
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
// Tired of AsyncTask in Android? | |
// Here's how you could write it in Groovy! | |
Fluent.async { | |
new URL('http://foo').text | |
}.then { text -> | |
textView.text = text | |
} |
etsinko: I had the same problem. You need to download this class to your project and save it as Fluent.java, not Fluent.groovy. Then it will work.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This particular example crashes for me with the following stacktrace: