Class: Toybox.WatchUi.MenuItem
- Inherits:
-
Toybox.Lang.Object
Overview
See Also:
Direct Known Subclasses
WatchUi.CheckboxMenuItem, WatchUi.CustomMenuItem, WatchUi.IconMenuItem, WatchUi.ToggleMenuItem
Constant Summary
-
Alignment
Name | Value | Since | Description |
---|---|---|---|
MENU_ITEM_LABEL_ALIGN_RIGHT | 0 | API Level 3.0.0 |
Right align a MenuItem label |
MENU_ITEM_LABEL_ALIGN_LEFT | 1 | API Level 3.0.0 |
Left align a MenuItem label |
Instance Method Summary collapse
-
getIcon() as Graphics.BitmapType or WatchUi.Drawable or Null
Get the icon The icon that is used for the subscreen area will be returned If an icon is not been specified, this function will return
null
. -
getId() Lang.Object
Get a MenuItem identifier.
-
getLabel() as Lang.String
Get a MenuItem label.
-
getSubLabel() as Lang.String or Lang.Dictionary<Lang.Symbol, Lang.String or Null> or Null
Get a MenuItem substring label.
-
initialize(label as Lang.String or Lang.Symbol, subLabel as Lang.String or Lang.Symbol or Null, identifier, options as { :alignment as MenuItem.Alignment, :icon as Graphics.BitmapType or WatchUi.Drawable or Lang.Symbol } or Null)
Constructor.
-
setIcon(icon as Graphics.BitmapType or WatchUi.Drawable or Lang.Symbol or Null) as Void
Set the icon The specified icon will be displayed in the subscreen area when this Menu2 item is visible.
-
setLabel(label as Lang.String or Lang.Symbol) as Void
Set a MenuItem label.
-
setSubLabel(subLabel as Lang.String or Lang.Symbol or Null) as Void
Set a MenuItem substring label.
Instance Method Details
getIcon() as Graphics.BitmapType or WatchUi.Drawable or Null
Get the icon
The icon that is used for the subscreen area will be returned
If an icon is not been specified, this function will return null
getId() Lang.Object
Get a MenuItem identifier.
getLabel() as Lang.String
Get a MenuItem label.
getSubLabel() as Lang.String or Lang.Dictionary<Lang.Symbol, Lang.String or Null> or Null
Get a MenuItem substring label.
initialize(label as Lang.String or Lang.Symbol, subLabel as Lang.String or Lang.Symbol or Null, identifier, options as { :alignment as MenuItem.Alignment, :icon as Graphics.BitmapType or WatchUi.Drawable or Lang.Symbol } or Null)
Constructor
The :icon
option is only used on ConnectIQ 3.4.0 devices with subscreen support.
setIcon(icon as Graphics.BitmapType or WatchUi.Drawable or Lang.Symbol or Null) as Void
Set the icon
The specified icon will be displayed in the subscreen area when this Menu2 item is visible. If an icon is not been specified, the menu2 icon will be shown instead.
setLabel(label as Lang.String or Lang.Symbol) as Void
Set a MenuItem label.
setSubLabel(subLabel as Lang.String or Lang.Symbol or Null) as Void
Set a MenuItem substring label.