Hi all,
I've just added some log (device dimension HxW and field dimension HxW) to the default data-field project to understand the logic behind the onLayout(dc) when I change data field (1,2,3...) from simulator.
(https://github.com/dodor84/data-field)
- This is the log when the sim start with one field:
initialize
D: 322x246 - 322x246
- then I add another field (2 field)
D: 322x246 - 160x246
- then I add another field (3 field)
D: 322x246 - 106x246
D: 322x246 - 105x246
D: 322x246 - 106x246
D: 322x246 - 105x246
D: 322x246 - 106x246
D: 322x246 - 105x246
D: 322x246 - 106x246
D: 322x246 - 105x246
D: 322x246 - 106x246
D: 322x246 - 105x246
D: 322x246 - 106x246
D: 322x246 - 105x246
D: 322x246 - 106x246
D: 322x246 - 105x246
D: 322x246 - 106x246
D: 322x246 - 105x246
D: 322x246 - 106x246
D: 322x246 - 105x246
D: 322x246 - 106x246
...
every second the function is called.
-----------------------------
In docs I read that the function is called before the View is shown to load resources and set up the layout of the View: https://developer.garmin.com/connect-iq/api-docs/Toybox/WatchUi/View.html#onLayout-instance_method
Why with one or two field is the function called just one time and when there are 3 or more field is called every second?
Is just a problem on the simulator?
can this be a battery leak?
thanks,
Edoardo