Android Wear Watchface background animation

I'm developing a watch face for android wear and I want to have an animation on the background in interactive mode.

Is this possible? I tried to do it as if it was "regular" android but it is not working since the watch face is not an activity - like here: http://developer.android.com/guide/topics/graphics/drawable-animation.html

Is there any other way or I should improvize?

Upvotes: 1

Views: 645

Answers (1)

Ran
Ran

Reputation: 1089

Of course there is a way!

When you use CanvasWatchFaceService.Engine you can draw anything you want on the canvas anytime you want.

So to create animation, just draw your stuff every 20ms or so and invalidate the canvas. This is the same way all watchfaces draw their graphics so it's not an improvisation at all.

Upvotes: 3

Related Questions