How to test a 6 Layout datafield

Hi, the simulator isn't able to show a 6 field layout. Is there any workaround to test this?

  • What simulated device, and what version of the SDK are you using?

  • SDK is 3.1.6, device is FR945. But I realized that the Fenix 6S Pro has the same resolution as my FR945 and here it works to simulate 6 fields as well. Maybe it will come with the next SDK release for the FR945, since it's brandnew to this device...

  • I don't understand how I can detect which field is used. It seems in the automatically generated code to been detected via the obscurity flags. But if I put a debug message in each if obscurtiy branch I end up only that the main layout is used which is center. Saying this, the "My Value" string is only depicted correct for the top and the bottom fields, but for the 4 middle fields it's way far to the right.

    Any hints how I can get this right?

  • Two things:

    1. I believe that there is a bug in the 3.1.6 SDK where onLayout is not getting called before drawing each data field. It is getting called once and the data field size information is getting re-used for all of the different field positions. It has been reported here on the forums, and we have made a fix that should be released with the next SDK. You could try using an older SDK. I think 3.1.5 should work.
    2. As far as I understand it, if the simulator is working correctly you can't always really tell which field your data is being shown in. For example, on the edge1030, there is a 10 field configuration and I'm pretty sure the first 8 are exactly the same size and obscurity. I don't think you can tell which of those 8 your field occupies.
  • device is FR945. But I realized that the Fenix 6S Pro has the same resolution as my FR945 and here it works to simulate 6 fields as well

    I haven't looked into it, but if the device has a 6-field layout and the simulator does not, then that is a simulator bug. This often happens because we often configure simulator support for a device months before launch, and then the field layouts change and we are not notified to update the simulator.

    I'll try to figure out what data field layouts are expected and verify we're accurately simulating them. If not, I'll get a JIRA filed.

  • As far as I understand it, if the simulator is working correctly you can't always really tell which field your data is being shown in. For example, on the edge1030, there is a 10 field configuration and I'm pretty sure the first 8 are exactly the same size and obscurity. I don't think you can tell which of those 8 your field occupies.

    I played around with it now and found the pattern behind it. With introducing the 6 fields the obscurity flags are not enough any more since you can't distinguish a 4 Layout field (e. g. the top field, which has obscurtiy top set) and 6 layout field (the top field has as well the top obscurity flag set). One has to call dc.getHeight() and do some math with respect to the screen height to find out which font size fits best.