I am a novice and now the moment came when I first encountered this problem, when on one screen the fonts and the distances between views look different from what you expect on different screens.
I googled, read offs and realized that everything depends on the density of the screen mainly. To solve this problem, create sub folders in the res folder for different densities.
and here are a few questions from the category of best practices that I want to clarify:
- There are 6 possible density options
ldpi, mdpi, tvdpi, hdpi, xhdpi, xxhdpi, do you need to take into account all these densities and create 6 folders? Or is there something interchangeable so to speak ... - If I create a subpack for
layoutfiles for each density, I also need to create the same sets of folders for images, so that each image has its own image ... True? - Is it possible, instead of creating sets of folders for images, to work with vector images? I understand that it is possible, but someone still works with folders and someone with a vector ... It depends only on the developer (on the habit of how to work)?
- And the last question, if I allow 20 screens, it turns out you need to create 6 folders in each, lay down 20
layoutfiles for each resolution. But how is this not to get confused when we assume you need to make a change to a file, you need to open 6 folders, find 6 corresponding files and change them in each one again? Right? - Maybe some other tips that should be considered?