I have confusion regarding multi screens support in android. I have gone through article for multi screen support at android developer forum. My question is if app has 15-20 images that need to be shown full screen on device screen. Now if I want to support all screens what resolution & densities images i should put in three folders ldpi, mdpi & hdpi. Here what i am doing till now
In ldpi - images of 240x320 resolution
mdpi - images of 320x480 reolution
hdpi - images of 720x800 resolution.
(I am using same densities for all three resolution)
I think this is not right approach.
What exactly I should do? Put images of different resolution in drawable-ldpi, drawable-mdpi & drawable-hdpi as above or should i use images of different densities 120 dpi, 160 dpi & 240 dpi. If i use images of different densities what should be their resolution(should 120 dpi resolution be 240x320, 160 dpi resolution 320x480 & 240 dpi resolution be 480x800). Or if i am using different dpi images their resolution should be same(320x480) for all densities .
I don't think Android uses the image density - it just goes by the pixel size and scales as needed. One thing to try would be to use a single "drawable" directory (i.e., delete the more specific ones) and put images with a 480 pixel width in it (which for the time being should be large enough for all phones).
I have tried that using images of 480x800 resolution. It does not look good when tested on device(samsung galaxy 3) or emulator of resolution 320x480 mdpi. Images look compressed, there are horizontal compression lines that are slightly visible.
If the approach you mentioned in your first post doesn't produce satisfactory results, maybe you need to do it programmatically: ship images of various sizes with the app, detect the screen size with your code, and then pick and display an image of appropriate size.
Lookout! Runaway whale! Hide behind this tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss