My partner, the designer, and I, the developer, are currently trying to figure out what is the best approach for performance and quality of an application across devices.
There are many cases where we can create the actual graphics such as button states and layout backgrounds, to name a couple, all based on xml. Some are complex and have a few layers and gradients, while others are simple shaped graphics.
At what point would it be recommended to have actual image drawables?
I'm thinking that the benefits of xml based graphics are higher quality and can be stretched and placed with flexibility across devices while actual image drawables need to be properly sized according for every screen densities or use nine-patch.
Could there be a performance penalty trying to create these xml drawables?
Premature optimization is the root of evil.
Also good suggestions are here: Performance wise, what is typically better, using an image or a xml created shape as a drawable? and here Android Drawable Drawing Performance?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With