There is one more option: using dip for scaling.
I have had the same problem - and tried out different ways. First of all was using different layouts for possible resolutions. But how can you be sure that it is running on all devices with different sizes of displays?
I solved it in this way:
Sub Layout_Init
...
Label1.Width=220dip
Label1.Height=370dip
Label1.Left=(Activity.Width-Label1.Width)/2
Label1.Top=(Activity.Height-Label1.Height)/2
...
lblMin1.Width=40dip
lblMin1.Height=40dip
lblMin2.Width=40dip
lblMin2.Height=40dip
lblMin3.Width=40dip
lblMin3.Height=40dip
lblMin4.Width=40dip
lblMin4.Height=40dip
...
lblMin1.Left=Label1.Left-40dip
lblMin1.Top=Label1.Top-30dip
lblMin3.Top= Label1.Top+Label1.Height-20dip
lblMin3.Left=Label1.Left+Label1.Width
lblMin2.Left=lblMin3.Left
lblMin2.Top=lblMin1.Top
lblMin4.Left=lblMin1.Left
lblMin4.Top=lblMin3.Top
...
End Sub
As you can see I made only one layout with the designer. Than I added a subroutine to init the layout: First I take one view (component) - in this example Label1 - using its
origin position and width and write the values as
dip.
This is my "main component". All other components are set in relation to this one:
lblMin1.Left=Label1.Left-40dip for example.
In the designer Textstyle is set to monospace and center.
It is also an additional work, but it works on different devices with different resolution and density. I tested it on Galaxy and Huawei smartphones as on Cat Nova tablet.
The advantage is we have not to design different layout for all possible devices on the market. And the text of the components is resized automatically with the right formatting.
mhc