hello , I was looking into `butterknife' and it se...
# android
l
hello , I was looking into `butterknife' and it seems like the view binding can be replace with
Kotlin Android Extensions
, but is there a way to replace also the annotation
@OnClick
for example ?
🚫 1
g
Just do that manually:
Copy code
import kotlinx.android.synthetic.main.button

fun onViewCreated() {
   button.setOnClickListener {
      toast("Clicked!")
   }
}
👍 2
l
Thanks , suspected that just wanted to confirm
k
Be aware that butterknife click handling debounces as well...
l
does that mean that detects two clicks or something like that ?
thanks for the tip in advance
g
On android you can click twice if will be fast enough. But you can do exactly the same denounce approach as Butter knife, just write extension function for that