In the Designer you make the layout for a specific width and height and associate a scale with it. The scale is used to match that layout to the device screen on which it is to be displayed by multiplying the view coordinates by the device scale and dividing by the layout scale. Nothing more, that's all the adjustment that is made. If there are multiple layouts in a layout file B4A will choose what it think is the closest match and then adjust the coordinates for display as above.
For instance I have the Designer open and am making a 320 x 480 scale 1 layout. The Designer is actually running on my 480 x 800 scale 1.5 device. I have set a Panel on the activity with coordinates 10, 10, 300, 400 so I intend it to almost fill the screen. On my device it is being displayed by the Designer with coordinates 15, 15, 450, 600 because it has scaled the coordinates as I described above so it looks the same as it would on the smaller lower scale screen.
It really is quite simple. At runtime the layout that best matches the screen is chosen and the coordinates scaled by DeviceScale/LayoutScale. That's all that happens.