kotterknife
kotterknife copied to clipboard
added @OnClick replacement
A little less code to set up view onClick listener
In Kotlin adding a click listener on a view as already a single call, so I'm not really sure of the need for this.
button.setOnClickListener {
// do stuff
}
If this were to stay, I'd like to see the View
added to the callback since it's optional if there's only one arg (can be accessed with it
if you want) and so theres no need to lose information along the way.
The original butterknife version has debounced click listener to prevent multiple clicks. @rharter How do you handle this in Kotlin with such listeners?