I am getting some reports from some users of Venu that my datafield does not display correctly on their device. Everything works correctly on other devices and also on the emulator for the Venu. I calculate the screen size for the device by querying dc.getWidth(); and dc.getHeight(); Using the values returned to calculate the center and radius needed to draw on the screen.
As I say my code works perfectly on the emulator and no reports of this issue on other devices. On Venus it looks like it randomly reports the screen size as something bigger than 390x390 (the two images below show different displacement errors on the same device with the same version of data field). I have had this report from two independent Venu users now. Also included is a screenshot from the emulator. This error in the screen size changes, manifesting itself as my data field being pushed by a varying number of pixels to the right and up/enlarged on the users device.
Has anybody else seen this issue with the Venu and has any idea of the root cause of the issue?
Subset of code below:
protected var absoluteCenterX = 0.0; protected var absoluteCenterY = 0.0; protected var widthX; protected var heightY; function onUpdate(dc) { var widthX = dc.getWidth(); var heightY = dc.getHeight(); absoluteCenterX = widthX / 2; absoluteCenterY = heightY / 2; var radius = (widthX - 5/2) / 2; dc.setPenWidth(5); c.setColor(Gfx.COLOR_LT_GRAY, Gfx.COLOR_BLACK); dc.drawArc(absoluteCenterX, absoluteCenterY, radius, 1, zone1Start, zone1End); }