Which size should a background be for ldpi, mdpi, hdpi and xhdpi screens?

前端 未结 2 1414
攒了一身酷
攒了一身酷 2020-12-19 14:43

The designer has given me a background to include in my application. It has a lot of detail in it, so when trying to create a 9-patch image, it got blurry.

So, decid

相关标签:
2条回答
  • 2020-12-19 15:16

    generally, it could go like this:

    ldpi: 240 * 320 (small) mdpi: 320 * 480 (medium) hdpi: 480 * 800 (large)

    but, it won't cover quite a few possibilities regarding devices with 480 * 854 screen resolution, or newer devices with 720*1280..

    you have 2 options:

    1) try to design a new background that can be used as .9

    2) try to create multi-layer drawable - the drawable would consist of image which is in .9 format, and all the details that are "glued" on it

    the second approach requires quite a work from your side. Read about layered drawables here:

    http://developer.android.com/guide/topics/resources/drawable-resource.html#LayerList

    0 讨论(0)
  • 2020-12-19 15:21

    xlarge screens are at least 960dp x 720dp. large screens are at least 640dp x 480dp. normal screens are at least 470dp x 320dp. small screens are at least 426dp x 320dp.

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