According to the API documentation. This function should create an animation. This works correctly on the simulator. However on my real device (Forerunner 630) the animation is never completed and stops too soon.
2 ways to reproduce
The easiest way: Compile and build the "drawable" sample project for FR630 and sideload to FR630, and Run. The moving cloud works correctly on Simulator (also when FR630 is emulated). On the real FR630 the cloud stops somewhere on the screen (not where it should stop)
The 'A bit harder' way:
- To make sure it was not another problem in this code, i created a new watch app (new project IQ project, type app in Eclipse. So you get the one with the monkey)
- changed the following code:
function onShow() {
myString = new WatchUi.Text({
:text=>"Hello World!",
:color=>Graphics.COLOR_WHITE,
:font=>Graphics.FONT_LARGE,
:locX =>WatchUi.LAYOUT_HALIGN_CENTER,
:locY=>WatchUi.LAYOUT_VALIGN_CENTER
});
WatchUi.animate(myString, :locY, WatchUi.ANIM_TYPE_LINEAR, 1, 120, 0.3, AnimateCallback());
}
function AnimateCallback() {
System.println("AnimateCallback called");
WatchUi.requestUpdate();
}
// Update the view
function onUpdate(dc) {
// Call the parent onUpdate function to redraw the layout
View.onUpdate(dc);
myString.draw(dc);
}
- compile and build for FR630. On the simulator the "hello world" stops exactly where it should (in the middle of the screen). You can also see that AnimateCallback is called (being logged to console). However on real FR630 the hello world animation stops before its in the middle of the screen (the bug)
- I did do another test: If i add a timer which refreshes the UI after about 1 second, you can see that when the timer goes off, "hello world" is shown at the correct place again. however if i change the timer to 300msec (the same duration as the animation), it looks like the display is not refreshed, so "hello world" is at the wrong place on the display.
I hope you can fix this. I would really like this functionality to work on my FR630. And since i'm building an app to be used on other devices as well i must be sure this functionality works on all other devices.