Class: Toybox.WatchUi.IconMenuItem

Overview

A representation of an icon item in a Menu2.

An IconMenuItem is a element of a Menu2 View that represents one of the options in the menu. An IconMenuItem has an icon displayed on the left or right of the menu item labels.

An IconMenuItem can be added to a Menu2 using the addItem() method.

See Also:

Since:

API Level 3.0.0

Supported Devices:

Instance Method Summary collapse

Instance Method Details

getIcon() as Graphics.BitmapType or WatchUi.Drawable

Get IconMenuItem icon.

Returns:

Since:

API Level 3.0.0

initialize(label as Lang.String or Lang.ResourceId, subLabel as Lang.String or Lang.ResourceId or Null, identifier as Lang.Object or Null, icon as Graphics.BitmapType or WatchUi.Drawable, options as { :alignment as MenuItem.Alignment } or Null)

Constructor

Parameters:

Since:

API Level 3.0.0

setIcon(icon as Graphics.BitmapType or WatchUi.Drawable or Lang.ResourceId) as Void

Set the IconMenuItem icon.

Parameters:

Since:

API Level 3.0.0

Throws:


Generated Apr 1, 2024 11:04:34 AM