@BindClick

This annotation can be used with classes inheriting/implementing:

  • android.app.Activity
  • android.app.Fragment
  • android.support.v4.app.Fragment (with the spork-android-support dependency)
  • android.view.View
  • spork.android.ViewProvider

You can specify the view id as the annotation value:

@BindClick(R.id.download_button)
private void onClickDownload() {
}

Alternatively, you can imply the view id by the method name:

@BindClick
private void download_button() {
}

You can also pass the any compatible View instance as method argument:

@BindClick(R.id.download_button)
private void onClickDownload(Button button) {
}