Which size should a background be for ldpi, mdpi,

2019-01-26 16:12发布

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, deciding to have a background to all major screen densities in Android devices, what should be exactly the background image size?

For example:

  • ldpi - 200 x 200
  • mdpi - 300 x 300
  • hdpi - 400 x 400

Is there any standard I should follow?

Many thanks,

Felipe

2条回答
相关推荐>>
2楼-- · 2019-01-26 16:32

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.

查看更多
beautiful°
3楼-- · 2019-01-26 16:55

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

查看更多
登录 后发表回答