Skip to content

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.

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
_Name string No
_Type const No

Caption

Use Caption to display a text button on ActionBar. Caption also serves as fallback in case the SystemItem / Icon / IconText defined 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).


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.


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.

Position Known Values

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.


Visible

Set the visibility of this control.

  • type: boolean
  • default: true

_Name

  • type: string

_Type

  • type: const

The value of this property must be:

"Control.Type.ActionBarItem"