2
votes

I made a lot of search on this topic but all goes in vain. I am making a splash for my Android app but problem with it is that images distorted on different screens. I have read the Google's "Supporting multiple screen" article but still it's not working. Please tell me the sizes of the images that i have to put under the ldpi,mdpi,hdpi and xdpi folders?

I tried the followings: Replaced images in ldpi,mdpi,hdpi,xhdpi folders. If in anyhow i am able to set images for Portrait mode perfectly then it go weird on Landscape mode. Please help me Guys. Thanks in advance.

1
@Nunu i have already mentioned in my question that i am not able to understand what to place in the folders from this page. Haven't you read full question?Rohit

1 Answers

4
votes

You have a couple of options:

Make a 9 patch splash screen (make parts of it stretchable).

Do not stretch your image (instead of android:scaleType="fitXY" use android:scaleType="fitCenter", for example, and center imageview inside a layout.

Make a simpler splash screen layout with multiple imageviews, that will handle different resolutions without a problem.

Edit:

For multiple imageview options, you take one part of your splash scree (for example center logo), put in inside actual layout, start application. Does it look good? Okay, that take it's size (in px) and device density to this calculator, for example, and see what sizes for other densities would be

For example, is 200 px looks good on your hdpi device it should be something like this:

ldpi    @ 133.33dp   = 100.00px

mdpi    @ 133.33dp  = 133.33px

hdpi    @ 133.33dp  = 200.00px // this one is your device

xhdpi   @ 133.33dp  = 266.67px

Edit 2:

To be honest, no one knows how it works. Some voodoo rituals might help.