Animation Bug?

Hi,

I found out that onAnimationComplete() is called on a very high frequency althogh WatchUi.animate() was not called. This happens only in the main view.

Background: I have an user option to deactivate animations. As soon the user deactivates it, the WatchUi.animate() is not called any more by code. Saying this, the onAnimationCompleted is called anyway on a high cyclic basis. I assume as fast as it can repeatedly start. The problem now is, that the onAnimationCompleted hosts a requestUpdate command causing my PC to activate it's fans but the simulator has no problem to resolve this situation correctly (due to the processor performance). As soon as I try this on my watch, the main view hangs since there isn't that processor performance. 

I used the very same code on other (sub) views. Here I haven't got the problem. Therefore I assume that this is a bug. Can someone confirm?

  • I think it would be helpful if you provided some code.

    If WatchUi.animate() was not called, then we have no way to know to call onAnimationComplete()... so you must have called WatchUi.animate() at least once.

    So it seems that you have animations running and then the user disables them via the option. When this happens you are seeing the animation callback get invoked very frequently, but you're certain that you're not calling WatchUi.animate() any more?

    the onAnimationCompleted hosts a requestUpdate command

    You shouldn't need to call WatchUi.requestUpdate() from the animation complete callback. The system should perform an update automatically in this case. Of course it shouldn't cause a problem if you do this (it would be a bug if it did), but it should not be necessary.

  • I tried to reproduce it with sample code but this seems to work as expected. Anyhow, I putted println everywhere in my code and couldn't recognize that the WatchUi.animate() was called. 

  • This is probably a case where it would help if you provided a test app. I've tinkered with the animation stuff quite a bit and never been able to get it to do something like what you're describing.