Design-Patterns-In-Kotlin
Design-Patterns-In-Kotlin copied to clipboard
Wrong usage of an Observer/Listener pattern example
I suppose that the usage example of Observer/Listener should be this:
val textView = TextView().apply {
listeners.add(PrintingTextChangedListener())
}
with(textView) {
text = "Lorem ipsum"
text = "dolor sit amet"
}
It is right in the pattern detail though.