2

Greetings fellow Droidheads and the like. I am working on a Live Wallpaper project that's getting more complex. I am curious: has anyone figured out a way to use Android's View Animation package (http://developer.android.com/guide/topics/graphics/view-animation.html) from within live wallpaper? It doesn't seem obvious to me that this is possible, in that it is a service rather than an activity, and you are given a surfaceholder to lockdown to get a canvas on which to draw--no way to setContentView, etc. The tween package seems to depend on views (i.e. the animation gets associated with the view itself, not the canvas, bitmap, etc.). Any thoughts? Thanks in advance. George

George Freeman
  • 2,260
  • 1
  • 15
  • 22

2 Answers2

1

I built a library that let you interpolate and animate any Java object, optimized for Android (without any garbage collection).

Since I'm not here to publicize a product (it's an open source lib, LGPL), I would encourage you to read my answer in this thread:

Android: tween animation of a bitmap

Tell me if it solves your problem :-)

Community
  • 1
  • 1
Aurelien Ribon
  • 7,548
  • 3
  • 43
  • 54
  • I would have to experiment to see if I can get this to work from within live wallpaper. I'm working on another project right now, so this will have to wait, but I appreciate the suggestion (upvote :-) – George Freeman Apr 13 '11 at 15:10
  • Nice :-) I would also like to know if it would work since I'm not used to live wallpapers development. However, since it's totally generic and can be applied to everything, not just android built-in types, there shouldn't be any technical limitation to its application. Good luck on your current project ;) – Aurelien Ribon Apr 13 '11 at 15:19
0

Endeavoring to answer my own question... No, I do not think this is possible. I have tried hard, with no success, and I have reviewed many examples of other people's code, and never seen anyone take this approach. What's more, even if it worked, I now think it wouldn't be a good idea: it's better for live wallpapers to take responsibility for their own drawing, to precisely control timing issues, &c. George

George Freeman
  • 2,260
  • 1
  • 15
  • 22