views:

81

answers:

1

I have a widget that periodically updates itself (hourly) to display top result of search query. I would like to extend it so it captures several top results and then loops through these. The best example would be Genie News and Weather widget for which I was unable to find a source code.

QUESTIONS:

  1. What would be a good way to implement the animation? I'm thinking ViewAnimator + timer, but is there maybe a better way, say FrameLayout + alerts? I'm already using AlertManager to periodically pull search results for the widget
  2. How bad such arraignment would affect phone's battery life?
A: 

You cannot animate an app widget by any conventional means. Anything that appears animated is either:

  1. Part of the actual home screen application, so there is no inter-process communication and therefore involves much less overhead
  2. Eating batteries for lunch, by posting new RemoteViews for the app widget every second or so
CommonsWare