Last active
May 17, 2018 08:31
-
-
Save igorwojda/c96c5bed8f264f989e596309c43fe8a0 to your computer and use it in GitHub Desktop.
kotlin-rxJava-double-click-detection
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
button.clicks() //Extension defined by RxBinding library | |
.buffer(250, TimeUnit.MILLISECONDS) | |
.map { it.size } | |
.filter { it >= 2 } | |
.subscribe{ Log.d("TAG", "Double click") } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The code doesn't work well. Using logcat to know why. Anyone find this gist. Don't use