According to the documentation, Menu2InputDelegate.onWrap()
should behave as follows:
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.
In the simulator, this mostly works as described - returning true
enables wrapping, and returning false
disables it. However, there seems to be an unrelated issue where wrapping upwards from the first element is broken regardless of the delegate.
On a real device, however, onWrap()
does not work as documented. No matter whether true
or false
is returned, Menu2
always wraps.
Below is the minimal delegate I used for testing. In the simulator, this disables wrapping as expected. On the actual device, it has no effect:
class SettingsMenuDelegate extends Menu2InputDelegate {
public function initialize() {
Menu2InputDelegate.initialize();
}
public function onWrap(key as WatchUi.Key) as Lang.Boolean {
return false;
}
}
Environment:
-
SDK version: 8.1.1
-
Device: Epix 2 Pro