Interface definition for a callback when an action happens in a widget. More...
Public Member Functions | |
void | onSidebarAction (Widget widget, int action, Bundle extras) |
Called when action was triggered from a widget. More... | |
Interface definition for a callback when an action happens in a widget.
Example:
ButtonWidget buttonWidget; ... buttonWidget.setOnSidebarActionListener(new OnSidebarActionListener() { public void onSidebarAction(Widget widget, int action, Bundle extras) { if(action == ButtonWidget.EVENT_BUTTON_1_CLICKED) // button 1 was clicked } });
void onSidebarAction | ( | Widget | widget, |
int | action, | ||
Bundle | extras | ||
) |
Called when action was triggered from a widget.
widget | instance of widget that triggered the callback |
action | ID of the action. Action IDs are defined as final static members of Widget classes |
extras | if not null, contains additional data of the callback |
Referenced by Widget.invokeOnSidebarActionCallback().