Dear All,
I have an app in which i am putting swiftbutton programatically at a location which is almost at the middle of the screen, i am using following code.
My problem is that it is showing the buttons nicely on my samsung A50, but moving the buttons up on S8 and further up on TabS2. I think this is because of different screen sizes and resolutions.
Is there a way to place a control at the middle (screen height) of screen whatever the screen resolution and size.
I have an app in which i am putting swiftbutton programatically at a location which is almost at the middle of the screen, i am using following code.
B4X:
Dim lv As LayoutValues
lv = GetDeviceLayoutValues
mpos = (lv.Height/4.3)
For i = 1 To 26
lpos = 15+(colnum-1)*35+(colnum-1)*xoffset '35 is swiftbutton width
tpos = mpos + (rownum -1)*50
Addbutton(lpos*1dip, tpos*1dip,i,z)
Is there a way to place a control at the middle (screen height) of screen whatever the screen resolution and size.