On Fri, Mar 20, 2009 at 10:02 AM, Paper Coder <[email protected]> wrote:
> What about simple animations? I can see extensive animations bogging > things down, but how about simple artwork and png animations for the fast > stuff? It depends. But just assume that vector-based graphics are going to be significantly slower than PNG images. I can't tell you how much slower -- in fact if your "vector image" is just a rectangle, it could be a bit faster. But it is likely to be more complicated, and the more complicated it is, the slower it will be. And let's not even get in to XML descriptions of vector images. Parsing XML is slow as well. This is why we compile all XML resources into a binary format -- even though that binary format is fairly general-purpose and closely matches the XML format, it is about 100x faster to process on the device. And to put that in perspective, inflating a view hierarchy from a binary layout file is probable still 10x slower than if you were to hand-code Java to instantiate the view objects and configure them yourself. -- 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 -~----------~----~----~----~------~----~------~--~---

