Widget with one or two buttons.
More...
Widget with one or two buttons.
Color getBgColor |
( |
int |
buttonId | ) |
|
- Parameters
-
- Returns
- background color of button
- Exceptions
-
- Returns
- count of buttons in widget (1 or 2)
int getFont |
( |
int |
buttonId | ) |
|
- Parameters
-
- Returns
- font of button
- Exceptions
-
Returns tag of the widget given in constructor.
- Returns
- tag of the widget
Referenced by Sidebar.setWidget().
String getText |
( |
int |
buttonId | ) |
|
- Parameters
-
- Returns
- text of button
Color getTextColor |
( |
int |
buttonId | ) |
|
- Parameters
-
- Returns
- text color of button
- Exceptions
-
void invokeOnSidebarActionCallback |
( |
int |
action, |
|
|
Bundle |
extras |
|
) |
| |
|
inherited |
void setBgColor |
( |
int |
buttonId, |
|
|
Color |
bgColor |
|
) |
| |
Sets background color of button.
- Parameters
-
- Exceptions
-
IllegalArgumentException | if buttonId is not BUTTON_1 or BUTTON_2, or bgColor is null |
void setCount |
( |
int |
count | ) |
|
Sets the count of buttons in widget.
- Parameters
-
- Exceptions
-
IllegalArgumentException | if count is not 1 or 2 |
void setFont |
( |
int |
buttonId, |
|
|
int |
font |
|
) |
| |
Sets font of button.
- Parameters
-
- Exceptions
-
- Parameters
-
Register a callback to be invoked when an action happens on this widget.
- Parameters
-
listener | the callback that will run |
- See also
- OnSidebarActionListener
void setText |
( |
int |
buttonId, |
|
|
String |
text |
|
) |
| |
Sets text pf button.
- Parameters
-
void setTextColor |
( |
int |
buttonId, |
|
|
Color |
textColor |
|
) |
| |
Sets text color of button.
- Parameters
-
- Exceptions
-
IllegalArgumentException | if buttonId is not BUTTON_1 or BUTTON_2, or textColor is null |
final int EVENT_BUTTON_1_CLICKED = 1 |
|
static |
Event ID: button 1 was clicked.
final int EVENT_BUTTON_2_CLICKED = 2 |
|
static |
Event ID: button 2 was clicked.