Acknowledged

Don't refresh screen

Hello, I have created an application with a lot of drawings that I would like to optimize, as most areas are only refreshed once every 5 minutes or even once an hour. The problem is that everything I develop on the simulator is different on the hardware. I see this with fonts, but even more in my case where I would not like to see the entire screen refresh.

Thank you!

Below is an example to test, works well on the simulator, but not on the watch

```

import Toybox.Application;
import Toybox.Graphics;
import Toybox.Lang;
import Toybox.System;
import Toybox.WatchUi;

class DontRefreshTestView extends WatchUi.WatchFace {

function initialize() {
    WatchFace.initialize();
}

function onLayout(dc as Dc) as Void {
    setLayout(Rez.Layouts.WatchFace(dc));
}

function onShow() as Void {
}

// Update the view
function onUpdate(dc as Dc) as Void {
    // Get the current time and format it correctly
    var timeFormat = "$1$:$2$:$3$";
    var clockTime = System.getClockTime();
    var hours = clockTime.hour;
    var timeString = Lang.format(timeFormat, [hours, clockTime.min.format("%02d"), clockTime.sec.format("%02d")]);
    dc.setColor(Graphics.COLOR_RED, Graphics.COLOR_GREEN);
    System.println(timeString) ;
    dc.drawText(180+clockTime.sec*2, 140+clockTime.sec*2, Graphics.FONT_LARGE, timeString, Graphics.TEXT_JUSTIFY_CENTER);
}

function onHide() as Void {
}

function onExitSleep() as Void {
}

function onEnterSleep() as Void {
}

}

```

  • Yes a watchface, 

    ok, so i have 2 questions:
    - how to use my watchface in power saving mode? it only takes the default ones
    - If I understand correctly, if I want to avoid having to draw hundreds of text or bitmaps every second, the only way is to store them in a bitmap cache to display them again the next second and update what needs to be updated.

  • A watch face, correct?  In high power onUpdate will always be called every second, in low power, every minute.  No way to change that.

    For other app types like device apps and widgets/super apps, it's up to you when the screen is updated.

  • My message may not be specific enough, but I would like to avoid refreshing the screen and in my example, I want the time to be displayed diagonally on the screen.