Data field layout in full vs. 1/2 width on Edge device

Can I automatically detect if a data field is now in full or half width data field in Edge device?
I can always check the width of current data field, but is there way to have use different layout altogether when data fields are half the width?
  • While I haven't tried it on the edge, for complex DF's you can figure things out in onLayout().

    In your case, based on width/height.

    If, in Eclipse, if you do a file>new>ciq progect, and say DF, and a screen or two later select "complex", you get an example of using the "obscurity flags" for different layouts. But you can do the same kind of thing for width/height (obscurity flags don't really come into play on the Edge I believe)

    If you do dc calls and don't use the layout system, you can also just use the proper x/y based on the width/height when drawing things.
  • Just FYI, if you turn the device to landscape mode it can display up to 3 data fields side-by-side. You'll probably want to handle your layouts based on their size, not based on the percentage of the screen width they use.

    Travis
  • Just FYI, if you turn the device to landscape mode it can display up to 3 data fields side-by-side. You'll probably want to handle your layouts based on their size, not based on the percentage of the screen width they use.

    Travis


    I know I can use the dc width/height, but it would be easier to remember what I'm doing if I could have layouts named as Edge 1000 1/3 or Edge 520 1/2 or Edge 1000 full, instead of testing through all the widths and keeping track of them on my own.
  • Are the heights and widths of data fields available somewhere as a chart? Maybe for edges and maybe for all other devices too?
  • I'm not sure it's in any formal doc, but in your CIQ-sdk dir and in /bin is "devices.xml", and in there is the info about all DF layouts for all devices, and each possible w/h.
  • I'm not sure it's in any formal doc, but in your CIQ-sdk dir and in /bin is "devices.xml", and in there is the info about all DF layouts for all devices, and each possible w/h.


    Thanks. That was pretty much what I was looking for. Now I just need to detect which data field I'm at. Looks like there is quite a lot redundant code to check neccessary combinations. My issue is getting font sizes and text positions to work in every case.
  • I made a app to display the sizes and posted the results to Github.
    http://mkpaa.github.io/connect-iq-datafied-sizes

    Now I know the use cases I need to consider. :)
  • I just noticed that in the UXGuide in the latest SDK (1.2.9), Appendix C has the info for all variations of DF layouts for all devices, and includes things like the obscurity flags.
  • I just noticed that in the UXGuide in the latest SDK (1.2.9), Appendix C has the info for all variations of DF layouts for all devices, and includes things like the obscurity flags.


    Well. Just what I was looking for in the 1st place... :)
  • The appendix sometimes lags behind the list of actual devices. If you want the most up-to-date information, devices.xml is the best place to go.