Search code examples
androidimageresolutionmultilingual

Android pictures with different sizes and languages


i am including pictures with 4 resolutions and 2 languages, so i did the following folders:

drawable-en-hdpi  
drawable-en-ldpi  
drawable-en-mdpi  
drawable-en-xhdpi  
drawable-es-hdpi  
drawable-es-ldpi  
drawable-es-mdpi  
drawable-es-xhdpi  

...and in fact, it works, but the problem comes when I need to include some pictures that have not required language, I mean, pictures with no text. The first way was to include them in the generic drawable folder, but Android do not let me do this and finally I had to duplicate this pictures, I mean, include them inside drawable-en and drawable-es folders. I have no idea why this happens but seems like if is mandatory add all the images that are used in all languages folder.

Thanks in advance.


Solution

  • Put non localized images in new folders without the -en and -es suffix.
    i.e.:

    drawable-ldpi  
    drawable-mdpi  
    drawable-hdpi  
    drawable-xhdpi  
    drawable-xxhdpi  
    drawable-xxxhdpi