0

I have samsung galaxy 7" tab(hdpi) and kindle fire 7" hd device. both having different screen resolutions(samsung galaxy - 1024*600 and kindle fire hd - 1280*800). both are hdpi devices, so naturally picking resources from drawable-hdpi.

Now i want following thing to do:

one image say Img1.png is created in 2 different size and same name

Eg: Img1.png(say 72*72px) and Img1.png(say 78*78px)

Now how to place these images under drawable-hdpi folder so that 72*72 image will picked up by samsung tab and 78*78 by kindle fire.

Is there any naming convention followed for images or drawable folder so that android can identify images for hdpi devices with different screen sizes,

Please please help me for the same.

Thanks in advance,

Ketan Bhangale

Ketan
  • 423
  • 3
  • 12

3 Answers3

0

Images for hdpi are selected automatically when the app detects the screen to be a hdpi one. You just have to place the images of same name but different sizes in respective folders.

kittu88
  • 2,451
  • 5
  • 40
  • 80
  • Thanks for the reply... but i want to place image with resolution say 600x1024 for samsung hd tab in drawable-hdpi folder as well as image with same name as for samsung tab but with resolution 800x1280 and want to place in same drawable-hdpi folder. but same name resouces in same folder does not acceptable. so is there any specific naming conventions to images like image1_x or image1_2x etc.. Thanks in advance... ketan – Ketan Nov 27 '12 at 07:48
  • No, you can never keep two images with the same name in the same folder – kittu88 Nov 27 '12 at 07:54
0

You could place the larger into a sw600dp folder (adjusting the value if necessary).

cjk
  • 45,739
  • 9
  • 81
  • 112
0

Actually there is a naming convention. According to how you name your resources folder android selects where to pick the graphics from. Here you can find a full list of all the different qualifiers that are supported.

For example, drawable-en-rUS-land applies to US-English devices in landscape orientation.

However I am not sure that there is any qualifier that can distinguish the 2 devices.

Community
  • 1
  • 1
Thomas Kaliakos
  • 3,274
  • 4
  • 25
  • 39