Reputation: 2458
I come from an iOS background, where one of the rules for fast views is to avoid transparent backgrounds and pngs if possible. I haven't found any information about this on Android. So my question is, should I use non-transparent views and drawables where possible, or does Android not care about this as much as iOS does?
Upvotes: 4
Views: 1716
Reputation: 4908
You might want to check out the Android documentation regarding overdraw.
Unlike standard overdraw, in which the system completely hides existing drawn pixels by drawing opaque pixels on top of them, transparent objects require existing pixels to be drawn first, so that the right blending equation can occur.
Upvotes: 0
Reputation: 6322
just like @blackbelt said, transparency always impacts on performance. When possible, avoid using transparent views and/or images.
Also, in Android you can have translucent views/activities. Those will impact performance a few orders of magnitude more than simple transparency. If possible, avoid those too.
Upvotes: 2