Tell someone how to make my application work on all types of screen sizes. I created drawable-large-mdpi and other folders, but this increases the size of the application itself. If there are any unique ways, share the link, except that it was from there that I took drawable-large-mdpi and so on.

  • one
    this is the right way. It all depends on how much you decide to cram in there. If there are hundreds of pictures, then yes, it will greatly increase the size. But you can download pictures separately. You can make your version of the application for each resolution. And then in the market just properly load. - KoVadim
  • The pictures are decent, the controls are buttons, etc., the background, in general, the interface is all built on the pictures. - 5mi13
  • one
    So you need to reconcile everything and find pests. For example, you can try to replace some pictures with system ones (even better for the user). Some gradients can be replaced by drawable objects. drawable using simple xml allows you to do interesting vector things. The next step is to use 9-patch. And so on until the result. - KoVadim
  • By design, nothing can be changed there, the slightest millimeter is divergent, everything is immediately rejected. - 5mi13
  • so what's the problem? neatly, under the ticker to find a balance between size and labor costs. - KoVadim

1 answer 1

All correctly described above. For each density group (density) and, if you need to be divided by size, then for each size group there is its own picture.

That is, if without separation by screen size, then:

res/drawable-ldpi/ res/drawable-mdpi/ res/drawable-hdpi/ res/drawable-xhdpi/ res/drawable-xxhdpi/ 

If divided into groups of sizes:

 res/drawable-large-hdpi/ res/drawable-large-ldpi/ res/drawable-normal-hdpi/ res/drawable-normal-ldpi/ ... 

I use this utility to simplify this process. The project is not mine, but I added a group of sizes and coefficient for myself. I do not remember where I took the original source, but I can share my changes.

You expose the parameters, you throw the necessary files into the program, next you generate folders with the necessary sets of pictures. Coefficient (for convenience, I sewed up 85%) if it differs from 1, then before generating a set of images, the original is resized by this value. Sizes is indicated only for the names of folders into which the sets of images are generated - this is more convenient if you make a specific set for, for example, normal. 9-patch also generates great.

I hope someone will help.