According to the example in the docs one should (probably?) call View.onUpdate(): https://developer.garmin.com/connect-iq/api-docs/Toybox/WatchUi/DataField.html
// Update the field layout and display the field data function onUpdate(dc) { View.findDrawableById("Background").setColor(getBackgroundColor()); var value = View.findDrawableById("value"); value.setColor(Graphics.COLOR_BLACK); value.setText(hrValue.format("%.2f")); View.onUpdate(dc); }
However there's nothing explicit about calling View.onUpdate. My DF doesn't work if I call View.onUpdate from the last line. The whole screen becomes black. However if I call it from the 1st line or I don't call it at all then it works. So what does View.onUpdate exactly do? Probably it clears the screen (but why with black instead of white?) If that's all it does then I don't need it because in my onUpdate I anyway clean the whole area.