How do I play an animation each time a widget is updated, like the default News widget?
I know that I can't directly use animations on RemoteViews
, but it is possible at least to add a LayoutAnimation
- however this only plays the first time the widget is added.
I was going to accept that was the end of it, but then remembered that the default News/weather widget (at least on 2.1 up) plays an animation each time the news changes.
Does anyone have any ideas as to how this is accomplished, or does exploit a private API or do something 开发者_Python百科that generally cannot be done with the SDK?
This has been answered over on the Android Developers group.
In API Level 7 and above ViewFlipper
is a valid RemoteViews
view type.
精彩评论