Environment
- Device: Enduro 4
- Firmware: 6.48
- Connect IQ SDK: 9.3.0
- App: data field built on
WatchUi.SimpleDataField, minApiLevel 3.2.0
Problem
On the data fields shown on top of the map, a SimpleDataField doesn't match the built-in fields next to it. On a normal data page the same field matches the built-in fields.
- Actual: the value is drawn in a slightly larger font than the built-in fields, and without the white outline the built-in fields have, so it is harder to read over the map.
- Expected: the same font size and the same white outline as the built-in fields on the map page.
A SimpleDataField has no control over its font or outline, so the app can't work around this.
Steps to reproduce
- Install a data field built on SimpleDataField (sample code below).
- Add it to the data fields of an activity's map page, next to a built-in field.
- Start the activity and open the map page.
- Compare the Connect IQ field (truETE) with the built-in field (HODINY = clock): font size and outline.
Screenshot from the watch attached:
Simulator
This can't be tested in the simulator. None of the 76 device definitions installed through the SDK Manager, Enduro 4 included, has a data field layout for the map page; the simulator only offers the normal data pages. Developers can't check how their field looks on the map before release.
Sample code
The field is a plain SimpleDataField whose compute() returns a short string. A minimal version:
import Toybox.Activity;
import Toybox.Lang;
import Toybox.WatchUi;
class MapTestField extends WatchUi.SimpleDataField {
function initialize() {
SimpleDataField.initialize();
label = "truETE";
}
function compute(info as Activity.Info) as Numeric or Duration or String or Null {
return "1:40";
}
}