I'm making a widget for the Edge 1030 (touch screen) and I'm using the <button behavior="onCustom"> element with a BehaviorDelegate as documented here (https://developer.garmin.com/connect-iq/core-topics/input-handling/). This works fine but only for one tap in the simulator. Any subsequent taps don't seem to call the "behavior" method. Do I need to reset the state of the button somehow after click?
<button x="center" y="90" width="50" height="50" background="Graphics.COLOR_WHITE" behavior="onRefresh">
<state id="stateDefault" bitmap="@Drawables.DefaultRefreshButton" />
<state id="stateHighlighted" bitmap="@Drawables.DefaultRefreshButton" />
<state id="stateSelected" bitmap="@Drawables.DefaultRefreshButton" />
<state id="stateDisabled" color="Graphics.COLOR_BLACK" />
</button>
class MyButtonDelegate extends WatchUi.BehaviorDelegate {
function initialize() {
BehaviorDelegate.initialize();
}
function onRefresh() {
System.println("onRefresh");
return true;
}
}