Question

I'm developing an android application that will run on multiple devices.

I'm currently using 2 images in the layout, but I'm facing a problem. Both Nexus 7 and Nexus S falls in HDPI layout, they load the same images. One of the images is used to create a "footer" of my application, and it's designed to fit the Nexus S size (480 px), so it's stretched in my N7, resulting in something ugly.

Is there any way I can fix this?

Was it helpful?

Solution 2

Try using drawable folder according to screen size eg.

1. drawable-large
2. drawable-small
3. drawable-normal

Or according to width eg.

1. drawable-sw360dp
2. drawable-sw480dp

OTHER TIPS

Low density Small screens QVGA 240x320 (120dpi):

layout-small-ldpi (240x320)  
layout-small-land-ldpi (320x240)

Low density Normal screens WVGA400 240x400 (x432) (120dpi):

layout-ldpi  (240 x 400 )
layout-land-ldpi  (400 x 240 )

Medium density Normal screens HVGA 320x480 (160dpi):

layout-mdpi (320 x 480 )
layout-land-mdpi (480 x 320 )

Medium density Large screens HVGA 320x480 (160dpi):

layout-large-mdpi (320 x 480 )
layout-large-land-mdpi (480 x 320)

Galaxy Tab ( 240 dpi ):

layout-large  (600 x 1024) 
layout-large-land  (1024 x 600)

High density Normal screens WVGA800 480x800 (x854) (240 dpi):

layout-hdpi (480 x 800)
layout-land-hdpi (800 x 480)

Xoom (medium density large but 1280x800 res) (160 dpi):

layout-xlarge (800 x 1280)
layout-xlarge-land (1280 x 800)
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top