@Retention(value=CLASS)
@Target(value=METHOD)
public @interface Click
This annotation is intended to be used on methods to receive events defined
by View.OnClickListener.onClick(android.view.View)
when
the view has been clicked by the user.
The annotation value should be one or several of R.id.* fields. If not set, the method name will be used as the R.id.* field name.
The method MAY have one parameter:
View
parameter to know which view has been clickedExample :@Click(R.id.myButton) void clickOnMyButton() { // Something Here } @Click void myButtonClicked(View view) { // Something Here }
Copyright © 2010-2014. All Rights Reserved.