Skip to content

Instantly share code, notes, and snippets.

View rmakiyama's full-sized avatar
🚀
Mobile app engineer

Ryo Makiyama rmakiyama

🚀
Mobile app engineer
View GitHub Profile
@rmakiyama
rmakiyama / DebounceTest.kt
Created October 4, 2018 13:18 — forked from k-kagurazaka/DebounceTest.kt
RxJava debounce like operator implementation for kotlin coroutine
launch(UI) {
editText.onTextChanged()
.debounce(1, TimeUnit.SECONDS)
.consumeEach {
Log.d("DebounceTest", "value: $it")
}
}
}
fun EditText.onTextChanged(): ReceiveChannel<String> =
@rmakiyama
rmakiyama / DebounceTest.kt
Created October 4, 2018 13:18 — forked from k-kagurazaka/DebounceTest.kt
RxJava debounce like operator implementation for kotlin coroutine
launch(UI) {
editText.onTextChanged()
.debounce(1, TimeUnit.SECONDS)
.consumeEach {
Log.d("DebounceTest", "value: $it")
}
}
}
fun EditText.onTextChanged(): ReceiveChannel<String> =