Help with readKeyInt

I am working with "readKeyInt" to draw several bitmaps when the user uses the settings function.

The sim loads well with all the functions (time, background, etc). However, when I select the theme, the bitmap does not load upon command. Now, if I select a new theme on the simulator and then re-run the app, it loads the new image. The sim does not allow me to change the theme similar to how the background color is changed.

Has anyone experienced this challenge? Can someone point me in the right direction to enable the themes upon command?

  • Well since this is a watchface app, onUpdate() will be called every minute. So the chosen period of time between image updates should be a multiple of 1 minute (e.g. 1 minute, 2 minutes, 5 minutes, etc.)

    Once you decide how often you want to loop the images, then you need a way to determine the last time you changed the image. Once you have that, you can write code that says "if current time minus last time is greater or equal to the image update period, change the image".

    Since you are already displaying the current (clock) time, you can use the information about the current time to loop the images. Alternatively, if you want a method which works even if the clock time is changed (which would be a rare, but valid case), you can use System.getTimer(), which returns the uptime in milliseconds.