Hi,
I updated to the latest ConnectIQ last night and am seeing _LOTS_ of problems while testing different screens... but all of them come down to a single bug in the simulator.
BUG DESCRIPTION:
onLayout is _NOT_ called correctly for all the different screen layouts.
It is only called for a subset of them and width is not correct for split fields.
STEPS TO REPRODUCE:
1. Add this to your "onLayout" for a datafield:
var flags = DataField.getObscurityFlags();
var isBR = flags == OBSCURE_BOTTOM | OBSCURE_RIGHT;
var isBL = flags == OBSCURE_BOTTOM | OBSCURE_LEFT;
var isTR = flags == OBSCURE_TOP | OBSCURE_RIGHT;
var isTL = flags == OBSCURE_TOP | OBSCURE_LEFT;
Toybox.System.println("onLayout("+dc.getWidth()+" x "+dc.getHeight()+" br:"+isBR+" bl:"+isBL+" tl:"+isTL+" tr:"+isTR);
2. Start simulator with a layout that responds to both width and height.
3. Test all the different field layout configurations and watch the console output.
EXPECTED BEHAVIOUR:
onLayout should be called for each of the different sizes of dataField to be laid out.
EG: A four field display with the second and third on the same row might be:
onLayout(215 x 55 br:false bl:false tl:false tr:false
onLayout(107 x 66 br:false bl:false tl:false tr:false
onLayout(107 x 66 br:false bl:false tl:false tr:false
onLayout(215 x 55 br:false bl:false tl:false tr:false
ACTUAL BEHAVIOUR
onLayout is only called for the _first_ layout, so split rows show incorrectly unless all rows are split