Menu options on Connectiq 1.4

I have a FR630 and i'd like to use the default menu's in an connectiq app i am coding, like the menu's which are in the FR firmware itself. The nice thing in the normal menu is that apart from the menu item text, there are also icons and values. e.g.:
- when you press menu on the normal clock. You will see the word clock, but also an icon of a clock.
- When you hit that menu item, you will see the text "watchface", but also a subline at that menu item stating the current selected menu item.

If i look at the API, i only see something like:

[FONT="Lucida Sans"]function onMenu() {
var menu = new WatchUi.Menu();
var delegate;
menu.setTitle("My Menu");
menu.addItem("Item One", :one);
menu.addItem("Item Two", :two);
delegate = new MyMenuDelegate(); // a WatchUi.MenuInputDelegate
WatchUi.pushView(menu, delegate, WatchUi.SLIDE_IMMEDIATE);
return true;
}[/FONT]



This menu.additem only allows for an item text, not an icon and also not a subvalue.

Does anyone know how I can add this to a custom coded menu?


KR ARnold
(PS i know the menu2 has more functionalities, but this a FR630. So this class is not available)

  • akamming I have created a branch on DMenu where we can test changes without affecting any (theoretical) ppl using the code.

    The first thing I have done is:
    - Re-enable animations (ANIM_TIME = 0.3)
    - Fixed the obvious issue where the animation "jumps" at the beginning

    https://github.com/flowstatedev/Dmenu/tree/exp

    You might want to fork/clone that branch and see if you can get it to work on the real device.

    Also, I don't see why it shouldn't work now. The original problem was that the animation did not run to the end. This was resolved by adding an "animation completed callback" which finalizes the animation. If it's still not working, then the device firmware is not calling the animation completed callback, which would make this a hard problem to fix. The only thing I can think of would be to launch a timer that finalizes the animation, but with the very small application limit of 3 timers, this could cause someones app to crash.
  • hi, thanks. i think the problem is more basic. I did some addional testing on new code. All works fine in the simulator. But is problematic on my FR630:

    1st test: I created this code on the basic app (if you create a new app in connectiq with the monkey)

    function onShow() {
    myString = new WatchUi.Text({
    :text=>"Hello World!",
    :color=>Graphics.COLOR_WHITE,
    :font=>Graphics.FONT_LARGE,
    :locX =>WatchUi.LAYOUT_HALIGN_CENTER,
    :locY=>WatchUi.LAYOUT_VALIGN_CENTER
    });
    WatchUi.animate(myString, :locY, WatchUi.ANIM_TYPE_LINEAR, 1, 120, 0.3, AnimateCallback());
    }

    function AnimateCallback() {
    System.println("AnimateCallback called");
    WatchUi.requestUpdate();
    }

    // Update the view
    function onUpdate(dc) {
    // Call the parent onUpdate function to redraw the layout
    View.onUpdate(dc);
    myString.draw(dc);

    I the console i see that AnimateCallback is called. On the simulator it works perfect. On my device: The animation stops halfway. It looks like the WatchUI.requestupdate does not update the ui.


    2nd test: compile the "drawable" sample widget/app. In the simulator i see a moving cloud also if i emulate the FT630. On my device FR630 the cloud stops halfway.

    i think this is a very clear bug in the firmware. Do you (or anyone else) know how to put it on the official buglist?
  • i think this is a very clear bug in the firmware. Do you (or anyone else) know how to put it on the official buglist?


    Post in the CIQ Bug Reports Forum
    But be forewarned, the fr630 is a pretty old (CIQ1) device and new FW doesn't come out that often.

  • akamming, yes, like I said the animation does not seem to run all the way. Thank you for testing that.

    BTW, I would appreciate it if you could send me the full stack trace (if available) from my app crash, so I can fix the problem, as I cannot reproduce it in the sim or on my 935. Thanks.

    Also, I think DMenu is fully functional now, it's just a lil basic without the animations. But hopefully it looks and works okay.
  • akamming FYI, after the latest fix pushed to github for the "jump" (*) at the beginning of the animation, the DMenu test app works flawlessly (**) on a 935, with animation enabled (ANIM_TIME = 0.3 seconds).

    (*) The original code would "jump" to the end of the animation before starting it....
    (**) When judged by the way it's supposed to work, anyway. The animation for the real native menu is a bit more sophisticated, as it doesn't animate the black title bar. DMenu does animate the title bar and it looks a little funny. The native menu also doesn't keep the two horizontal separators in a fixed position while animating, like DMenu does.

    It's just too bad I don't think animation will ever work properly for old watches. And for new watches you can just use Menu2.

    But you've still got an almost native menu that doesn't animate.... TBH I was pretty happy to disable animation for my apps, knowing that it will at least look normal, even if it looks basic.
  • [It's just too bad I don't think animation will ever work properly for old watches.


    i'm just hoping Garmin will fix. I remember a long time ago i compiled the drawable sample app and it looked ok, also on my watch. So they introduced a bug somewhere in time.


    [/SIZE][/FONT][/COLOR][/LEFT]But you've still got an almost native menu that doesn't animate.
    Agreed. However for great apps the user happiness depends on small (not te bo underestimated) things.


    [/SIZE][/FONT][/COLOR][/LEFT]pretty happy to disable animation for my apps, knowing that it will at least look normal, even if it looks basic..

    good to hear. It is a nice app you developed. Would be a shame if you got bad ratings due to a firmware bug
  • akamming agreed. Many times I see ppl settling for things that are "just good enough" instead of great, which is frustrating. Then again, sometimes the enemy of good is perfect. So it's hard to find that balance.

    For example, if I insisted that DMenu has to work with animation, then I would have to remove it from my apps and I have no good alternative.

    Having said that, I added some issues to the repo which need to be fixed to make DMenu great. Most of them are only relevant when animation is enabled, but one of them is relevant to touch scrolling with or without animation.

    https://github.com/flowstatedev/Dmenu/issues

    Here's the touch issue:
    https://github.com/flowstatedev/Dmenu/issues/1

    Anyway I think the problem here is they want all of us to buy new watches. So even if some people at Garmin wanted to fix these issues, it could be that management will not let them.
  • akamming FYI I've fixed all the (known) cosmetic issues in DMenu, including the ones that affected animation. You can check out the closed issues in my fork and try the sample app if you want. I think it looks a lot better when animating now, but hopefully you can enjoy that on a real device one day, too.
  • akamming FYI I've fixed all the (known) cosmetic issues in DMenu, including the ones that affected animation. You can check out the closed issues in my fork and try the sample app if you want. I think it looks a lot better when animating now, but hopefully you can enjoy that on a real device one day, too.


    Tx. I will try but only if the animation bug is fixed on the FR630 (and probably other devices). Otherwise the behaviour will be unpredicable.

    My suggestion to you would be have the menu only to animate on CIQ 2 and 3 devices. The only known devices with the issue are a 235 and a 630. So probably a CIQ1.0 issue..
  • I use menu2 for ciq3 devices so that only leaves VAHR and 735xt. I don’t want to take the risk that they have that bug too because I can’t test irl.

    Anyway, there’s also a fix for not wrapping when you reach the bottom or top (with touchscreen scrolling), and for filling unused space (below the last item) with black. There’s also a fix for not scrolling when the user swipes left or right.

    Admittedly all the cosmetic changes I made are to make it look and feel like newer devices (645, 935), not older devices. I happen to think the newer devices do look better. (Not animating the separators looks really weird to me)

    But if you really want it to look native you would need separate code for Fenix 3, 230/630, and 645/935/fenix 5. For example, 230/630 use white on black while the other devices use black on white. At least that what I can see from YouTube videos. I don’t even remember what my old 630’s menus looked like....