In fact, anchors and scripts must be used.
There is this method:
View attachment 122744
I meant that you have to choose which layout to load based on the size of the display - not its resolution. Create a layout for smartphones and one for tablets. However, as far as the pixel density is concerned, for the same size of the displays, dip is used. As for the relationship between base and height, continuing to thank the producers ???, we have to make do, generally leaving at least a ten dip free on the edges.