Resize your image according to screen sizes?

后端 未结 1 588
攒了一身酷
攒了一身酷 2020-12-18 12:44

I noticed that whenever I tested my app on my Droid X and Droid Bionic, the images where actually fine. But whenever I tested it on Larger devices such as Android Tablet. Th

相关标签:
1条回答
  • 2020-12-18 13:20

    You need not re-size manually & add in "drawable-hdpi,drawable-ldpi,drawable-mdpi" This will increase your APK's size, instead use only one High Resolution image and put it in "drawable-nodpi" or just in "drawable" or drawable-hdpi. Test it in all the devices. It should work fine. Tip: put the image that will look Good in 10.1 WXGA, Automatically, the Lower size screen will look good.

    EDIT : Create image of the Ratio 3:4:6:8

    Ex: if you have an image of width:120px and Height:90px for low resolution devices (drawable-ldpi), then, for drawable-mdpi is 3:4 (120x4/3) = 160
    drawable-mdpi the image size should be W:160px , H:120px
    drawable-hdpi the image size should be W:240px , H:180px (twice of ldpi)
    drawable-xhdpi the image size should be W:320px , H:240px (twice of mdpi)

    Make sure that all your images are of good quality, even if it's of different dimensions.

    Refer : How to Support Multiple Screens

    0 讨论(0)
提交回复
热议问题