Please give a clear answer. Here in Android there is a density of screens. ldpi mdpi hdpi xhdpi xxhdpi.

  1. What should initially be the size of the picture so that it is displayed equally on all screens
  2. Which utility or service or site to use to share this picture for each density, so that it is displayed equally on all screens?
  • And what is the same? - Barmaley

3 answers 3

Well, I also asked this question, and not finding any software on the Internet, I decided to make my own. Because pictures must be provided by the customer , then I didn’t develop this program much.

here's a program

The rules are:

  • perceives only .png files
  • choose a picture with the first button
  • choose the location of the project's res folder. it is necessary to specify a folder called res .
  • enter the size of the picture, which should be in the folder medium, 50x50 for example;
  • check boxes in which you want to put the picture.

    Use the official guides screen support and multiscreen . Android Studio has the ability to view the screen on various devices. In the peview tab of your layout, select Preview All Screen Sizes.

      It is enough to put the picture in the folder with the highest density (xxxhdpi, or xhdpi), and it will scan all the lower densities. You can do it in the reverse order (put in mdpi, and it will skip to xxhdpi), but the quality of the pro-leaked image will leave much to be desired.
      Problems in this approach can if you use 9-patch-drawable (* .9.png) images.

      Also, the application will work somewhat slower (at least in theory), since the system will have to scale the images (not a fact, but for some reason I think so)