OK, I struggling to get my head around scaling and need some advise on the best way to do this.
I want to support all devices. I see in the designer I can design for iPhone (Landscape and Portrait) and iPad (Landscape and Portrait) . OK so I have four designs created fine.
But when I run on my iPad all the text in the Labels is fine (font set to 32 in the designer) then I try this on my iPod touch and see that all the fonts are now too large.
When I rotate the device it stays in the previous orientation and doesn't switch (losing some of the screen to off screen space area)
I see that AutoScaleAll is now supported...
https://www.b4x.com/android/forum/threads/designer-script-autoscale-tutorial.47184/#content
How does this work? I can't seem to find this command in the code anywhere....
I am sure there is an easy method that I am missing.
With B4A I had a simple routine to scale all views to any size of android device, this worked fine
I want to support all devices. I see in the designer I can design for iPhone (Landscape and Portrait) and iPad (Landscape and Portrait) . OK so I have four designs created fine.
But when I run on my iPad all the text in the Labels is fine (font set to 32 in the designer) then I try this on my iPod touch and see that all the fonts are now too large.
When I rotate the device it stays in the previous orientation and doesn't switch (losing some of the screen to off screen space area)
I see that AutoScaleAll is now supported...
https://www.b4x.com/android/forum/threads/designer-script-autoscale-tutorial.47184/#content
How does this work? I can't seem to find this command in the code anywhere....
I am sure there is an easy method that I am missing.
With B4A I had a simple routine to scale all views to any size of android device, this worked fine
B4X:
Sub ScaleAll(Act As Activity)
For Each Item As View In Act.GetAllViewsRecursive
Try
Item.Left = Item.Left * ScaleH
Item.Top = Item.Top * ScaleV
Item.Width = Item.Width * ScaleH
Item.Height = Item.Height * ScaleV
Catch
Log(Item)
' Skip CustomListView
End Try
If Item Is Label Then
Dim lItem As Label
lItem = Item
lItem.TextSize = lItem.TextSize * ScaleT
End If
If Item Is Spinner Then
Dim sItem As Spinner
sItem = Item
sItem.TextSize = sItem.TextSize * ScaleT
End If
Next
End Sub