2010/11/21 Zsolt Vasvari <zvasv...@gmail.com> > In other words, if you are targeting 1.6 or later, all you need is the > hdpi version and it will be scaled to mdpi and ldpi? Are there any > performance penalties associated with that scaling? >
Well there are certainly *some* performance penalties, since the bitmap is larger and needs to be scaled to be drawn. We try to keep these at load time (scaling bitmaps and nine-patches when loading instead of when rendering), but you can go around the framework and cause it to have to the scaling at draw time. You also do need to be aware of cases where scaling might cause undesirable artifacts... for example you wouldn't want to build dithering into your bitmaps (another performance impact if you then need to dither at render time), there can be interesting artifacts in 9-patches, etc. > What about 1.5? I know 1.5 is ancient, but I think I will support it > as long as 3% or more of the users use it. > 1.5 doesn't know how to scale. You should, however, just be able to put your medium density graphics in the root drawable directory instead of -mdpi. -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. 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 android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en