Skip to content
This repository has been archived by the owner on Sep 12, 2019. It is now read-only.

added @OnClick replacement #25

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

piotrpo
Copy link

@piotrpo piotrpo commented Oct 6, 2015

A little less code to set up view onClick listener

@rharter
Copy link
Contributor

rharter commented Mar 17, 2017

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.

@3mph4515
Copy link

The original butterknife version has debounced click listener to prevent multiple clicks. @rharter How do you handle this in Kotlin with such listeners?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants