Thank you. That's very helpful.
Dianne Hackborn wrote: > You shouldn't need to use a worker thread. If you want to run up to the > screen refresh rate, just do invalidate() in onDraw(). Otherwise, you can > use Handler in the main thread to post delayed messages to achieve whatever > update rate you want. > > On Mon, Jan 5, 2009 at 4:04 PM, melody <[email protected]> wrote: > > > > > I wasn't able to do this with the standard animation classes, but I > > did manage to do it. > > > > First I used the use of the ArcShape class to generate the slice of > > the pie. In order to acheive the animation, I set up a worker thread > > to repeatedly change the sweepAngle and call invalidate() on the > > containing view at an arbitrary refresh rate (50ms seems to look > > smooth). It seems to work fine, but again, if anyone knows of a > > better way to do this, I'm all ears. > > > > > > > > melody wrote: > > > Hi, > > > > > > I tried asking this in the beginners forum but didn't get any > > > responses so I thought I'd try here. > > > > > > I was wondering if someone could give me some guidance on how to do an > > > animated pie chart. My initial idea is to have a circle background > > > image as my pie, and then create a "slice" of the pie and animate the > > > scale and rotation of the slice. However I'm not really sure how to > > > do that. > > > > > > Or if there is a completely different but better way to do this, that > > > would be great to know too. > > > > > > Thanks. > > > > > > > > -- > Dianne Hackborn > Android framework engineer > [email protected] > > Note: please don't send private questions to me, as I don't have time to > provide private support. All such questions should be posted on public > forums, where I and others can see and answer them. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

