I need to run my application on multiple devices with diffrent specs. Now I'm trying to get it work on just two: Samsung Galaxy tab p100 and Galaxy tab 7.0 plus the differnces I'm care about now are dpi,the first device is 240 dpi
the second is 170
and the version the first runs 2.2 he later 3.2 first I put the Images on the hdpi
folder images on 7.0 plus is smaller and ugly so I copied them to mdpi
folder works fine but this would double the size of my APK. Is there any way to make android auto fit Images without the need to copy Images?
I am looking to create a system which on signup will create a subdomain on my website for the users account area.
If you want that images look fine in either the device you have to provide the same images for mdpi and hpdi at differente resolution (see Alternative drawables).
ReplyDeleteHowever if you put all you images in mdpi directory only, Android will scale theme for hpdi screens. But you have to use dp and not px for all your dimensions (see Density independence).
Consider also how Android pre-scale and auto-scale resources (see Additional Density Considerations).
Android 7.0 i guess supports xhdpi images(Xtra Large screens with resolution 960dp x 720dp) So if you would use image of less resolution it would definitely look bad. You can get one high resolution image for xhdpi phone n try do it. I think it will work for you.
ReplyDelete