Answer the question
In order to leave comments, you need to log in
callback and listener?
1) I have read that callback is used to get some kind of response from execution, i.e. it is executed after other functions complete, but I can't figure out how to do it with lambda, I can do like this:
fun testLambda(lambda:()->(Unit)){
lambda()
}
Answer the question
In order to leave comments, you need to log in
Listener (listener) is a callback (callback), waiting for the onset of some event. The fact that you use a lambda in general is in no way connected with flows, with who will be called before whom. When you call, then it will be.
Listener and Observer is a matter of terminology and naming. Listener and Observer. Essentially one and the same.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question