You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
tylertreat edited this page Dec 31, 2012
·
2 revisions
The Bind annotation is used to indicate that the annotated View is to be bound to a callback method for a given event type. This replaces the need to implement an anonymous inner class in your Activity's onCreate method for your event listeners.
The event attribute corresponds to the event type, while callback indicates the name of the method to be invoked. If an Event is not specified, Event.OnClick is used by default.
The callback method should match the normal listener method in terms of its return type and arguments. For example, an onClick callback should be void and take a View as its argument, while an onKey callback must return a boolean and take a View, int, and KeyEvent as its arguments.