Class: Toybox.WatchUi.Menu2InputDelegate

Overview

Menu2InputDelegate responds to a Menu2 selection.

This class should be extended to handle selected Menu2 items.

See Also:

Example:

using Toybox.WatchUi;
using Toybox.System;

class MyMenu2InputDelegate extends WatchUi.Menu2InputDelegate {
    function initialize() {
        Menu2InputDelegate.initialize();
    }

    function onSelect(item) {
        System.println(item.getId());
    }
}

Since:

API Level 3.0.0

Supported Devices:

Instance Method Summary collapse

Instance Method Details

onBack() as Void

A Menu2 Back key was pressed. If this method is not overridden, it will pop the active view.

Since:

API Level 3.0.0

onDone() as Void

A Menu2 Done item was selected. This method is only triggered by a CheckboxMenu If this method is not overridden, it will pop the active view.

Since:

API Level 3.0.0

onFooter() as Void

A CustomMenu footer was selected.

This method is triggered on products with touch input when the user selects the footer area of a CustomMenu. This method is only triggered by a CustomMenu.

Since:

API Level 3.0.0

onSelect(item as WatchUi.MenuItem) as Void

A Menu2 MenuItem was selected.

Parameters:

Since:

API Level 3.0.0

onTitle() as Void

A CustomMenu title was selected.

This method is triggered on products with touch input when the user selects the title area of a CustomMenu. This method is only triggered by a CustomMenu.

Since:

API Level 3.0.0

onWrap(key as WatchUi.Key) as Lang.Boolean

A Menu2 is preparing to wrap.

This method is triggered on button-based products when the user attempts to navigate off the end of a menu. If this method returns false the list will not wrap to the opposite end. If this method is not overridden, it will return true and allow the menu to wrap.

Parameters:

Returns:

Since:

API Level 3.0.0


Generated Sep 23, 2024, 3:32:49 PM