Code:
Output:
Landscape
1794 x 1080, scale = 3.0 (480 dpi), size = 4.3625
** Activity (main) Resume **
Portrait
1080 x 1776, scale = 3.0 (480 dpi), size = 4.33
** Activity (main) Resume **
Why is device screen size larger in landscape mode?
Tested on Nexus 5 (it will not happen on all devices).
B4X:
Sub Activity_Create(FirstTime As Boolean)
If 100%x > 100%y Then Log("Landscape") Else Log("Portrait")
Dim lv As LayoutValues = GetDeviceLayoutValues
Log(lv & ", size = " & lv.ApproximateScreenSize)
End Sub
Output:
Landscape
1794 x 1080, scale = 3.0 (480 dpi), size = 4.3625
** Activity (main) Resume **
Portrait
1080 x 1776, scale = 3.0 (480 dpi), size = 4.33
** Activity (main) Resume **
Why is device screen size larger in landscape mode?
Tested on Nexus 5 (it will not happen on all devices).