Acknowledged

Instinct 2 screen dimensions possibly wrong on the simulator

Hi,

I have raised a question on the Discussion forum regarding the area available for drawing a data field on the Instinct 2 family. The full thread is available here: https://forums.garmin.com/developer/connect-iq/f/discussion/401206/how-to-handle-the-instinct-2-screen/1885985#1885985

Basically, I ran a test in order to get the screen dimensions of the I2 base model and compared the results with the reference page. While the reference page says its dimensions are 176 x 176, the dc.getWidth and dc.getHeight return 112 x 71. Also, on the original thread, it was noted that the onLayout seems to be called twice when only one was expected.

As a consequence, the area available for drawing is reduced:

The same code on I3, for example, works as expected:

The code is the following:

screenWidth = dc.getWidth();

screenHeight = dc.getHeight();

screenLines = [

            // Horizontal lines

            [0, screenHeight/4, screenWidth, screenHeight/4],

            [0, 2*(screenHeight/4), screenWidth, 2*(screenHeight/4)],

            [0, 3*(screenHeight/4), screenWidth, 3*(screenHeight/4)],

            // Vertical lines

            [screenWidth/2, 2*(screenHeight/8), screenWidth/2, 6*(screenHeight/8)]

        ];

and eventually I use dc.drawLine to draw the lines.

So, is this some kind of bug on the simulator? Does this also happen on real devices?

  • Maybe this would work better for Instinct 2 Solar:

    Or maybe something more like this:

    - if the 2nd field actually has a rectangular dc (so you can draw outside the bounds of the subscreen, then that should be reflected in the diagram (as it is in the original diagram). (Then again, if the 2nd field can't draw outside of the subscreen, then it does make sense to only show the 2nd field as a circular area. I haven't tested it either way)

    - I'm conflicted on whether the subscreen should be solid black in any of the cases. I think it might depend  on whether, for the given case, the data field can actually draw on the subscreen or not.

  • Maybe this would work better for Instinct 2 Solar:

  • > What I think could be done to improve these diagrams

    To be clear I think the existing diagrams in the device reference guide are very unclear, where a subscreen is involved.

    If I hadn't seen the layouts in the simulator (and/or they weren't described to me otherwise), I probably wouldn't be sure what they actually are, in some cases, like the 2-field layout for Instinct 2

  • e.g .For Instinct 3 Solar:

  • What I think could be done to improve these diagrams:

    - In all cases, assign numbers to the individual fields, indicating their order in the data page

    - Shade the areas of the screen which are assigned to fields

    - When there's a device with a subscreen, and it's ambiguous as to which areas of the screen are actually assigned to fields and/or fields can overlap, have a separate diagram for each field.

    e.g. For Instinct 2:

    (Assuming that the 1-field layout actually exists)