Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 700
Billyjoker Avatar asked Jan 08 '14 16:01

Billyjoker


People also ask

What is best image format for Android?

WebP. WebP is a newer image format supported from Android 4.2. 1 (API level 17). This format provides superior lossless and lossy compression for images on the web.

What format are Android photos?

YCrCb format used for images, which uses the NV21 encoding format. Android private opaque image format.

What is Xhdpi?

xhdpi Resources for extra high-density (xhdpi) screens (~320dpi). nodpi Resources for all densities. These are density-independent resources.

How can you tell the size of a photo on Android?

On android go to photos, select your photo and click the ... in the top right. Scroll to bottom of page to find image size.


1 Answers

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  
like image 192
Phantômaxx Avatar answered Sep 27 '22 17:09

Phantômaxx