ActionBarItem¶
ActionBarItem is a control item that can be added to the action bar. Please note that Caption is required if the item is being displayed as popover menu. When ActionBarItem is displayed as popover menu, the text displayed is based on the value availability in the order of following properties: Caption, SystemItem, and IconText. If all properties are not defined, an error text would be shown.
When assigning a rule to a property of ActionBarItem, the rule will be passed an instance of the following proxy class as an argument:
ActionBarItem Properties¶
| Property | Type | Required | Default |
|---|---|---|---|
| Caption | string |
No | |
| Enabled | boolean |
No | true |
| Icon | Image | No | |
| IconText | string |
No | |
| IsIconCircular | boolean |
No | false |
| OnPress | ActionOrRule | No | |
| Position | enum |
Yes | |
| Style | string |
No | |
| SystemItem | SystemItem | No | |
| Visible | boolean |
No | true |
| Width | number |
No | |
| _Name | string |
No | |
| _Type | const |
No |
Caption¶
Use Caption to display a text button on ActionBar. Caption also serves as a fallback if the defined SystemItem, Icon, or IconText fails to render.
- type:
string
Enabled¶
Set the enabled of this control.
-
type:
boolean -
default:
true
Icon¶
Icon provided must have the correct size. Expected iOS sizes can be found here. The size of an action bar icon on Android is fixed at 24dp (both width and height).
- type: Image
IconText¶
If Icon is absent or fails to download and if Caption is missing, IconText is used to render a text-based Avatar image.
- type:
string
IsIconCircular¶
This determines if the Icon image and/or text-image of IconText should be circular in shape.
-
type:
boolean -
default:
false
OnPress¶
Action/Rule to be triggered when the item is pressed.
- type: ActionOrRule
- Formatter and Binding are not supported
Position¶
Position of the item in the ActionBar. For iOS & Android, this is ignored and all items will be placed on the right position except in modal page without back navigation which allows one item to be on the left side.
On iOS modal page without back navigation, if both ActionBar.Logo and left positioned item are defined, the logo can be displayed together with 1 left positioned item.
While on Android modal page without back navigation, if both ActionBar.Logo and left positioned item are defined, since Android can only support the display of 1 icon on the left side (text is not supported), only the logo would be displayed, while the left item would be displayed on the right side.
- type:
enum
The value of this property must be one of the known values listed below.
| Value | Description |
|---|---|
Left |
|
Right |
Style¶
The string value is a style class name of one of the following properties: Caption, Icon, and IconText.
For Caption display, the supported styles are listed here: TextClass.
For Icon display, the style is only applicable to SAP icon / font icon types with following reference ImageClass.
For IconText the supported CSS properties are font-size, color and background-color.
- type:
string
SystemItem¶
SystemItem are built-in icons/text that represent common tasks and types of content in a variety of use cases. If present, overwrites Caption and Icon.
- type: SystemItem
Visible¶
Set the visibility of this control.
-
type:
boolean -
default:
true
Width¶
Sets both width and height of the icon in device-independent pixels (dp on Android, pt on iOS). The default is 18 x 18. For example, if Width is 24, the icon will render at 24 x 24.
Notes:
- The maximum supported value is 36; values above this limit are automatically set to 36.
- Values less than or equal to 0 use the default size of 18.
- This property applies only to image icons and does not affect SAP icons or font icons.
-
When sizing your image, pay attention to any existing white space bordering the image.
-
type:
number
_Name¶
- type:
string
_Type¶
- type:
const
The value of this property must be:
"Control.Type.ActionBarItem"