- On the main view, when you return back to it from a menu or another view on the view stack, the main view's onUpdate is called twice. (This seem to happen on both the actual device as well as the sim)
- If you press the menu button on the home view (which causes a menu to be pushed onto the stack), the home view onUpdate() gets called again. Why is this necessary?
- On a menu with a drawable title, the drawable title's draw() method is called indefinitely at a rate quicker than 1 second. (This only happens on the actual device)
I added print statements in the methods that get called by the framework.
I have attached both the modified project as well as log files pulled off a f5+ to illustrate the issue, but here is a quick screenshot to show the issue:
- Build the project for a device, side load to the device
- Enable logging on device by adding txt file to LOGS folder
- Open the widget on the device. This triggers the home view's onUpdate() method twice.
- Press the menu button and wait for about 3 seconds. Later in the log you will note that the main menu's drawable title's draw() method was called >-3 times. The longer you wait, the more log entries you will see for this.
- Press back button to return to the home view. This will call onUpdate() of the home view twice again.
draw() method being called indefinitely at a rate faster than 1 second is a concern for battery
Multiple calls of onUpdate could also lead to drawing issues for unexpecting developers, and although less significant than the draw(), it could also negatively impact the battery.