I have a pack of icons, all 512x512, that is, in good quality, I threw them into drawable and work with them, I test the application on three devices, everything seems to be working fine. Is this a good solution - just use the same icons with the same resolution for all devices? Or let's say weak devices will fail because of this and I’ll have to do different resolutions of the icons by copying them into drawable-xhdpi ... etc

Second question: Is the difference fundamentally - will I place the icons in a mipmap or drawable?

    1 answer 1

    If everything was so simple and smooth - why would developers even bother about the density of screens? The axis itself stretches / compresses the image, if it is too small \ large for the screen of a particular phone, but this, by the way, takes some resources - and for lists with a large number of elements this can become a problem of lack of resources, which means lags.

    On top of that, some screens simply won't be able to fit the required dimensions, or they will look with artifacts \ squares \ irregularities - in other words, the consequences can be very different and if you are counting on a wide audience - you must do it for each screen density your icons.

    As for the second question - as far as I read, the mipmap is created more for structuring - this is exactly the same directory as Drawable. Each item should be in its place, and not hang out in a pile of other items - let them and similar ones. This is CamelCase of your project. Guideline.

    UPD to the question of numbers, official documentation reads as follows:

    Alternative drawables

    Figure 4. Relative sizes for bitmap drawables that support each density.

    For all screenshots, it’s not a problem. Likewise, if you include other bitmap bitmaps, for example, for different applications, for example.

    Note: You need to provide the density-specific drawables for the bitmap files (.png, .jpg, or .gif) and the Nine-Patch files (.9.png). If you use XML files, you can copy it in the default drawable directory (drawable /).

    To create an alternative bitmap drawables for different densities, you should follow the 3: 4: 6: 8: 12: 16 scaling ratio between six generalized densities. For example, if you have a bitmap drawable that's 48x48 pixels for medium density screens, it should be:

    36x36 (0.75x) for low density 48x48 (1.0x baseline) for medium density

    72x72 (1.5x) for high density 96x96 (2.0x) for extra-high density

    144x144 (3.0x) for extra-extra-high-density 192x192 (4.0x) for extra-extra-extra-high density (launcher icon only; see note above)

    At the same time I will attach a separate guide on the icons

    • And what sizes correspond to folders in drawable? On the Internet, I found LDPI 36 × 36. MDPI 48 × 48. TVDPI 64 × 64. HDPI 72 × 72. XHDPI 96 × 96. XXHDPI 144 × 144. XXXHDPI 192 × 192. Right distribution? - Yaktens Teed
    • @YaktensTeed should be right, well, I’m bother with this designer, so the numbers are not so deeply grounded :) - Silento
    • Just on the Internet I can not find information with tips, what size icon is better in which folder to push - Yaktens Teed
    • one
      @ YaktensTede figures were correct, updated the answer - Silento