With the new Kotlin coroutine release, Anko has de...
# anko
j
With the new Kotlin coroutine release, Anko has deprecated the
onClick{ }
, any idea what to use instead?
l
Yes, just launch a coroutine from your on click listener with a proper coroutine scope
👍 1
n
Could you show an example for this? The anko wiki is out of date (as usual). Things seem to have gotten a lot more verbose with anko and Kotlin 1.3, or am I wrong?
l
@nickk It's the same as launching a coroutines from anywhere else now, there's no longer any helper.
n
@louiscad I’m tempted to ditch
onClick
and use
setOnClickListener
l
You can. BTW, Anko 0.18 was just released
n
It seems anko 0.10.8 solves my issues with the coroutines of Kotlin 1.3