My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
AndroidAniClick  

android, test, widget
Updated Dec 2, 2010 by dvpubl...@gmail.com

AniClick is a demo application. It shows how to implement "animated" widget on Android.

The widget shows a wheel (i.e. first frame of wheel animation). But if you click on the wheel then it will start to spin. If you click on the wheel again, it will stop spinning. After that, the widget will show clicked frame from wheel animation.

Actually, the widget is static. Animation is implemented on activity. When you clicks the widget, new activity is created. The activity overrides whole desktop. And it is absolutely transparent - you can see original widget througt it. Activity draws animation exactly on the same screen place where original widget located. So, it looks for user as animated widget. When you click on the "widget" second time, activity closes itself and sends command to widget. Widget updates its content and starts to show clicked frame.

This approach is limited, but animation FPS is much better then real Animated Widget is able to provide.


My original blog message, in Russian.

View source codes.

Downaload source codes as 7zip-archive.

Download apk (api 2.1).


Sign in to add a comment
Powered by Google Project Hosting