Hi all, i have this problem. Why beetwen GetDeviceLayoutValues.ApproximateScreenSize and ActivitySize i have different Result ??
This is code in Activity_create
This is code in Design Script:
The result is:
GetDeviceLayoutValues.ApproximateScreenSize = 3.60
ActivitySize = 3.23
Any idea ??
Thank's
Marco
This is code in Activity_create
B4X:
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
Activity.LoadLayout("1")
' < 4.5
If GetDeviceLayoutValues.ApproximateScreenSize < 4.5 Then
Label2.Text = "ApproximateScreenSize: " & GetDeviceLayoutValues.ApproximateScreenSize
' > 4.5 e < 8
Else If GetDeviceLayoutValues.ApproximateScreenSize > 4.5 AND GetDeviceLayoutValues.ApproximateScreenSize < 8 Then
Label2.Text = "ApproximateScreenSize: " & GetDeviceLayoutValues.ApproximateScreenSize
'Tablet > 8
Else If GetDeviceLayoutValues.ApproximateScreenSize > 8 Then
Label2.Text = "ApproximateScreenSize: " & GetDeviceLayoutValues.ApproximateScreenSize
End If
End Sub
This is code in Design Script:
B4X:
'All variants script
AutoScaleAll
Label1.Text = "ActivitySize: " & ActivitySize
The result is:
GetDeviceLayoutValues.ApproximateScreenSize = 3.60
ActivitySize = 3.23
Any idea ??
Thank's
Marco