Android there are so called " DPI ", which are densities per pixel . Each screen has its type of DPI such as:
Smartphones:
- layout [?]
- layout-ldpi [240x320 & 240x400]
- layout-mdpi [320x480 & 480x854]
- layout-hdpi [480x800 & 480x854]
- layout-xhdpi [720x1280]
- layout-xxhdpi [1080x1920]
- layout-xxxhdpi [?]
Tablets:
- layout-mdpi [600x1024 & 800x1280]
- layout-xhdpi [2560x1800 | 2560x1600 | 2048x1536 & 1200x1920]
- layout-tvhdpi [800x1280]
For each type of screen there are " folders " with different image sizes :
- drawable
- drawable-hdpi
- drawable-large
- drawable-ldpi
- drawable-mdpi
- drawable-xhdpi
- drawable-xxhdpi
- drawable-xxxhdpi
My doubts are as follows:
1) In each layout folder, I create files with the same .xml name to the screen. But how do I know that android is using the screen in that particular DPI? Is it some code that I have to insert for does he use the layouts?
2) What is the "layout" and "drawable" folder named "pure" without using layout-ldpi for example? In this same question, what are the image sizes in the "pure drawable" and "pure layout" folders?
3) Assuming I have to create a background, landscape, and portrait at 800x600 resolution. The portrait is 800x600 and of course the landscape is 600x800. Should I create the background in these two resolutions? And how are these images properly called by Android?
4) Following the reasoning of the (3) question, for each resolution type, how do I know what size in px is ideal for images, icons, "normal" images and others?
5) If I want to create specific layouts as examples for the "sw600dp" dpi type. What should I do?
6) Following the reasoning of the (5) issue, you really need to create these types of custom layouts, or just the dpi I mentioned above already stick ?
7) How does creating layouts for tablets work? And how do I "layer" layouts of tablets with those of "smartphones" within the same Android project?
8) There are also folders of type "values", "values-v21", "values-v22". What is the purpose of these folders and what should be inserted into each of them?
I thank you for your patience, and please kindly follow the order of the questions so that there is no confusion.