Graphic dimensions for hdpi/ldpi/mdpi

前端 未结 4 1358
被撕碎了的回忆
被撕碎了的回忆 2020-12-12 19:51

I have a button graphic with dimensions 300*90.How must be the dimensions for hdpi/mdpi/ldpi?Thanks

4条回答
  •  情书的邮戳
    2020-12-12 20:27

    It depends on what size device screen you designed that graphic against. If you want it to display as 300x90 on an 320x480 (HVGA) canvas, then your pixel dimensions are correct for MDPI devices, and you would need the following images:

    • LDPI: 225x68px
    • MDPI: 300x90px
    • HDPI: 450x135px

    LDPI is 75% of MDPI scaling, and HDPI is 150% of MDPI scaling. If you designed those graphic dimensions on a 480x800 (WVGA) canvas, for example, then your dimensions are already correct for HDPI, and you need to scale the other two down from there:

    • LDPI: 150x45px
    • MDPI: 200x60px
    • HDPI: 300x90px

    Hope that Helps!

提交回复
热议问题