0

My device configuration is large-mdpi. But in my app, i have the images only for small-ldpi,normal-mdpi. Here how to findout the best match for this. i think i collects the images from the small-ldpi because our precedence contains small as first.please see this link. is it right? please can anybody help me.

thanks.

naresh
  • 10,332
  • 25
  • 81
  • 124

1 Answers1

1

Don't put size qualifiers on your drawable folders. Just make drawable-ldpi and drawable-mdpi.

Edit: Maybe I answered too quickly. Do you actually have different images for small and large screens at the same density? In that case, my advice is to always have a folder with a more general qualification. It's kind of like default in a switch statement.

In your instance, I'd go with:

drawable-ldpi
drawable-mdpi
drawable-large-ldpi
Sparky
  • 8,437
  • 1
  • 29
  • 41
  • See also this comment in the linked page (see original Q) that provides an added reason not to put size buckets on all your resources: "Caution: If all your resources use a size qualifier that is larger than the current screen, the system will not use them and your application will crash at runtime (for example, if all layout resources are tagged with the xlarge qualifier, but the device is a normal-size screen)." – Sparky Mar 09 '12 at 08:13