Hi!
I am new to programming Garmin watches so I started with a simple watch face. However, I am already stuck with the best way to create an energy efficient layout. I hoped to find a simple method how to set a static background and dynamic layers. Instead there seem to be dozens of ways how to implement this and the documentation does not provide a description which method should be used in which circumstance.
So far, I was lazy and did not want to deal with xml layouts. So I used the Dc object instead which is passed to onLayout(dc) and onUpdate(dc). I found that in this case, I can render any background by calling dc.draw... in onLayout(dc). Then I just create some layers by Toybox.WatchUi.Layer(...) which I update in onUpdate(dc). Now, I just read in the documentation "Note: You should never directly instantiate a Dc object, or attempt to render to the screen outside of an onUpdate call." - which I guess I am basically doing!?
I am kind of confused and annoyed by the different ways I could potentially solve the problem. Some things (like the layers) seem to be new in the SDK so that I could not find much in the forum.
Could anyone summarize the different methods which could be used for non-changing backgrounds and dynamic content, please? Which is the least energy consuming way to implement this?
Thanks!