Reputation: 502
I have been searching for how to create an animated widget. I have found a number of examples that dont seem to work properly and several post that say it should not be done. I tried the frame animation from this sample unsuccefully but I was able to get this type of animation to work with very very poor results and I had to turn off my phone.
I was going to give up but I figured I would download some other animated widgets to see if they run continuously or just on an event. I found that the battery widget by elvison runs while plugged in but I did not notice any performance issues.
I guess I would need to compromise and have mine animated while plugged in but maybe also run through a cycle when clicked or when updated.
Can someone explain how the battery widget animation is accomplished or how I should go about doing this in my app? Is there a working and well explained sample somewhere or can someone point me in the right direction of where to start?
Thanks, --Daniel
Upvotes: 0
Views: 578
Reputation: 502
After searching around and testing other solutions, I found this post which mentioned using the progress bar for animation. I didn't realize that progress bars could be customized but using one works perfectly. I will be testing the impact on resources leaving it animated vs. A short animation on an event.
Upvotes: 1