Fenix 7, custom widgets, glance view, swipe not working to close the full view of the widget

Hello all,

I developed a simple Widget, to show me my daily status (activity min, steps, battery power...)
It shows the data in glance view and also as full screen, if it's activated.

Everything works fine on my Fenix 6s pro. Now I have a new 7ss and compilied it for this watch.
It also works.

You can tap on it, to open the full screen from the glance view, so far so good.

But if you swipe right to close the full screen, it doesn't work. For built in Garmin Widgets, this works.
To close the full screen of my Widget, it's necessray to press the back key.
I have the same effect, with other custom Widgets from the Connect IQ store.

Is there something, that I must add in my code, to fully support touch?
Or is it still a bug in the 7s firmware?
Or in the SDK Connect IQ 4.1.0 Beta 1?

Thanks for help

  • Hi all,

    I found a solution.
    Just overwrite the onSwipe function and close the main Widget view, to return to the glance view.
    I'm not sure if this is the best solutiuon, but it works.
    Maybe Jim or someone else can comment it.

    class MyDelegate extends Ui.InputDelegate {
    
        var myView;
        
        function initialize(v) {
            Ui.InputDelegate.initialize();
            myView = v;
        } 
    
        function onSwipe(swipeEvent) 
        {
        	var swDir = swipeEvent.getDirection(); 
        	if (swDir == SWIPE_RIGHT)
        	{
    	    	myView.popView(SLIDE_IMMEDIATE);
    		return true;
        	}
    	return false;
       }
    

  • Historically, you have not been able to programatically pop the last view like this and had to rely on the system code doing this when pressing back or swiping when returning false in the delegate. I would say that this is a bug since the default action of the right swipe should be to exit here. However, I did discover that for the newer apps with glances, you can pop the last view back to the glance, so this does appear to be a good workaround.