1

In the Android res folder, we are presented with a few different folders that deal with different resolutions for images. In the past I have only used one image with the same resolution in one folder, and this has worked well for my specific applications. However, I'm hoping to make my future Android apps look essentially the same across an array of screen resolutions and devices. Any rules or guidelines to go by when creating different resolution sizes for the same image to put in each folder (i.e., should images that go in the medium resolution folder be 1.5x the size of those in a low resolution folder, etc.)?

krodmannix
  • 845
  • 10
  • 30
  • Have you checked out [this answer](http://stackoverflow.com/a/18656286/1217087)? – Adam S May 29 '14 at 01:24
  • Exactly what I was looking for. Can I mark this questions as duplicate myself? :p @AdamS, if you put that as an answer I'll accept, it is exactly what this question needed. – krodmannix May 29 '14 at 01:42
  • I was debating whether to mark this as a duplicate or not; in the end I decided I'd just answer it and attribute the other answer - I know I've had a fair bit of trouble finding that answer without the correct search terms in the past. – Adam S May 29 '14 at 02:05

1 Answers1

1

What you're looking for is the scale-factor for each folder. This works by taking the mdpi folder as the "base" scale of 1.0.

Scale-factors for each folder are as follows:

  • ldpi > 0.75
  • mdpi > 1.0
  • hdpi > 1.5
  • xhdpi > 2.0
  • xxhdpi > 3.0
  • xxxhdpi > 4.0

So, for example, taking a 48*48px image as your base mdpi image, you'd end up with 32, 48, 72, 96, 144 and 192px images.

Fore more detail, including the source for each of these values, check out shoe-rat's excellent answer from which I sourced much of this one.

Community
  • 1
  • 1
Adam S
  • 16,144
  • 6
  • 54
  • 81