Alison Sutherland
10/24/2017, 6:10 PMEugen Martynov
10/24/2017, 6:18 PMEugen Martynov
10/24/2017, 6:18 PMEugen Martynov
10/24/2017, 6:19 PMEugen Martynov
10/24/2017, 6:19 PMEugen Martynov
10/24/2017, 6:26 PMsherwani
10/25/2017, 9:45 AMnew Handler().postDelayed(new Runnable().......)
in Kotlin
, what is best approach to do this in Kotlinkarelpeeters
10/25/2017, 10:48 AM.postDelayed( Runnable { ... } )
should work.sherwani
10/25/2017, 11:03 AMUnresolved Refrence Error
also tried with Handler.postDelayed(Runnable {})
sherwani
10/25/2017, 11:05 AMpost.png▾
menegatti
10/25/2017, 11:06 AMsodiqoladeni
10/25/2017, 4:16 PMClaudiuB
10/25/2017, 7:22 PMinject
as an extension function from the class that is to be Injected. I'm thinking of something like this
abstract class Injectable <T : SomeBaseComponent> {
abstract fun T.inject(activity: Injectable)
}
but the more I think about it,
1. the less sense it makes to be possible to do (especially when you're adding a method to an existing interface)
2. making the T
method abstract makes the class abstract (??)
3. I would actually want sublasses of Injectable
to be passed, not the bass class itself.
Anything that can be done close to that maybe? 🤔trevjones
10/25/2017, 8:20 PMjabba
10/26/2017, 10:05 PMjabba
10/26/2017, 10:06 PM1
? Then, I want to call it again to get 2
, etc. How to do that?Shawn
10/26/2017, 10:14 PMShawn
10/26/2017, 10:14 PM.next()
?jabba
10/26/2017, 10:16 PMinfinite.next()
gives an error: unresolved referencebj0
10/26/2017, 10:20 PMSequence
, it doesn't have next()
, you can use anything for a sequence: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.sequences/-sequence/index.htmlbj0
10/26/2017, 10:21 PM.next()
on that: infinite.iterator()
jabba
10/26/2017, 10:37 PM[6, 7, 8, 9, 10]
. How to do that?diesieben07
10/26/2017, 10:47 PMinfinite.drop(5).take(5)
jabba
10/26/2017, 10:51 PMdiesieben07
10/26/2017, 10:57 PMdiesieben07
10/26/2017, 10:58 PMfor (element in infinite)
kristofdho
10/26/2017, 11:09 PMkristofdho
10/26/2017, 11:09 PM