• Calling this.layout.update(); every minute might be expensive?

    You could try removing lazy rendering, and do something like this:

    if (changed.d) { // check days first: may need to update layout
          this.layout.update(); // dayStr could be a different size now
          this.layout.render(this.layout.date);
          this.layout.render(this.layout.dayStr);
    }
    if (changed.h) this.layout.render(this.layout.hour);
    if (changed.m) {
          this.layout.render(this.layout.minutes);­
          this.layout.render(this.layout.steps);
    }
    
  • Thanks, I can try it but I'm not sure about it: without the renderTopBar() method the battery lasts at least 10 days. Now it lasts 2/3 days :-(

    I have no widgets installed: only alarms, messages & android app.

About

Avatar for Alessandro @Alessandro started