Does the Instinct 2 support layers, or am I missing something here?
I have written the simplest possible example of layer usage and whenever I start it on Instinct 2 (both the simulator and the actual device), all I get is a blank black screen without any errors or crashes.
However, if I start this example on some other watch simulators, everything is fine.
So far, it seems to me as if the displays with 16 colors and less do not support layers - am I correct, or am I missing something here?
import Toybox.Graphics;
import Toybox.WatchUi;
class ExperimentView extends WatchUi.View {
var layer as WatchUi.Layer;
var layer2 as WatchUi.Layer;
function initialize() {
View.initialize();
layer = new WatchUi.Layer({});
addLayer(layer);
layer2 = new WatchUi.Layer({});
addLayer(layer2);
}
function onLayout(dc as Dc) as Void {}
function onShow() as Void {}
function onUpdate(dc as Dc) as Void {
dc.setColor(Graphics.COLOR_WHITE, Graphics.COLOR_WHITE);
dc.clear();
layer.getDc().setColor(Graphics.COLOR_BLACK, Graphics.COLOR_WHITE);
layer.getDc().fillCircle(100, 100, 30);
layer2.getDc().setColor(Graphics.COLOR_BLACK, Graphics.COLOR_WHITE);
layer2.getDc().fillRectangle(120, 120, 30, 30);
}
function onHide() as Void {}
}