Watch face layout labels reset to default placeholder values on switching back to the face

Hi everyone, I have successfully created my dream watch face for my Instinct 2 but I have a problem, when switching back to my face there is a noticeable glitch where the label texts switch to the placeholder values in layout.xml before being updated to the correct values. I'm not doing anything fancy, just updating the labels in the view on update().

Am I missing some state handling somewhere?

Thanks for your help 

  • Hi everyone, sorry to bug, but is anyone out there?

  • Could you share your code (or a cut-down version which exhibits the problem) so we can look at it and try to recreate your problem? Does this happen in the sim, the real device or both? Does this only happen on the first update (sounds like it.)

    Without knowing anything more, I can only guess that maybe your view’s onUpdate() function calls View.onUpdate() before calling setText() to update the labels. View.onUpdate() renders the layout which would explain what you see. (i.e. The layout as defined in layout.xml would be drawn due to View.onUpdate(), then the label text would change due to setText().)

    If the labels only need to be set once, you could probably set them in onLayout() instead.

  • That's exactly what is happening, thank you. I was immediately calling the superclass method.