Scrolling down in Widget View

Hi,

I'm developing a Widget and I would like to display a scroll-able list on the main page (after clicking on the Glance view).

To illustrate what I'm saying, this is the behavior of the default Health Stats widget:

  • When scrolling through Glances, the widget shows limited information
  • When clicking on the Glance, the widget shows another interface similar to Glances (the neighboring items are partially visible)

Please see video below:
(video also available here: https://youtu.be/AIaU69ks10g)

How can I replicate this behavior in my widget?

It kinda looks like a Menu2 with custom images.
I have tried using a Menu2 by pushing the menu view within the onShow() function of my main view. Unfortunately, this traps the user in the menu as it instantly pops back up when pressing the back button. I've tried popping the main view but this doesn't seem to be allowed.

Thanks in advance for your help!

  • What you're looking at isn't written in CIQ - it's native to the firmware.

    With CIQ, you can't pop the main view.  You need to use the default actions for the back button.

  • Thank you for your input!

    Do you think it would be possible to create a view in CIQ emulating this functionality?
    For example, creating a layout that by default extends beyond the bottom of the display, and offsetting it when the user presses the Up/Down buttons?

    Is it possible to offset a layout? Or does everything have to be drawn in code and all the positions updated manually on button press?

    Are the Up/Down buttons even accessible from a widget's main view (when Glanced are enabled)? All the native widgets use those buttons...

  • You can build your own.  As long as it's not the main view, you can use up/down, even if not started from a glance.

  • Thanks.

    It's too bad you can't use Up/Down in main view from CIQ apps, when all the native widgets do (on Fenix 6S Pro). It really breaks the user experience...

    EDIT: apparently you CAN use Up/Down from main view when Glance is enabled (https://developer.garmin.com/connect-iq/connect-iq-basics/app-types/). Still need to figure out how to code the Menu2 basically from scratch...

  • apparently you CAN use Up/Down from main view when Glance is enabled

    Yeah, that makes sense. My particular use case was with overriding the BACK button, which is not possible in a top-level widget view (because then you have no way to exit the widget without crashing)

    Still need to figure out how to code the Menu2 basically from scratch...

    It's not perfect, but you can use DMenu:

    https://github.com/flowstatedev/Dmenu

    The UX is roughly that of the native menus in the FR230 and FR935 generations of devices.

    All credit goes to the original author, Dave Baldwin.

  • You can see if the widget/super app is started from a glace with 

    var sSettings=Sys.getDeviceSettings();
    if(sSettings has :isGlanceModeEnabled) {     
    	fromGlance=sSettings.isGlanceModeEnabled;
    }

  • Thank you so much FlowState for this codebase! I will definitely draw inspiration from it, it's not that far from what I'd like to do.

    Thanks jim_m_58 as well for the tip.

    I will keep this post updated if I ever figure it out Slight smile