Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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

like image 294
Felipe Caldas Avatar asked Feb 20 '23 18:02

Felipe Caldas


2 Answers

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

like image 105
Tomislav Novoselec Avatar answered Apr 08 '23 12:04

Tomislav Novoselec


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.

like image 22
Magician Avatar answered Apr 08 '23 12:04

Magician