0

If I have an image that I put solely in drawable-xxhdpi, and no other buckets, does this pose any risk regards shipping to devices that have lower or higher densities?

Historically, we always produced an image variant for each bucket, mdpi through xxxhdpi. However recently an image was placed solely in drawable (which I believe is analogous to drawable-mdpi) and this understandably produced out-of-memory issues when scaled up on certain devices.

The suggested approach in the answer to that question is to place said image in drawable-xxhdpi instead of drawable.

I'm fairly confident that this is acceptable but I would just like to validate that there are no problematic consequences here, including when the app is shipped and provisioned as a bundle (AAB). In particular is there any definitive documentation on the strategy for resolving bucketed resources?

Rob Pridham
  • 4,780
  • 1
  • 26
  • 38

1 Answers1

0

As far i know, if no ldpi resource is provided, mdpi resource would be taken.

For other types of resources it not guaranty, that it would work with only drawable-xxhdpi

First sources are looked in folder, that device supports (for example drawable-hdpi). If no resource found it looks in drawable

To use only one resource for all resolutions there should be used drawable-anydpi

But the pictures (png, jpg etc.) should be stored not in drawable better in mipmap, so at the end for one file for all resolutions mipmap-anydpi should be used.

anatoli
  • 1,663
  • 1
  • 17
  • 43