I got this code to detect screen resolution below. However, my Iconia A500 is spec'd to have a screen resolution of 1280x800 but the code 'detects' it at 1280x752 at 160dpi.
Can anyone see what might be causing the 752 finding when it's an 800 screen? Also, the dpi isn't 160, it's 149 (although 160 is close enough but I'm just wondering why it doesn't get that number).
Can anyone see what might be causing the 752 finding when it's an 800 screen? Also, the dpi isn't 160, it's 149 (although 160 is close enough but I'm just wondering why it doesn't get that number).
B4X:
Sub Get_Screen_Resolution
pScreenWidth=GetDeviceLayoutValues.Width
pScreenHeight=GetDeviceLayoutValues.Height
pScale=GetDeviceLayoutValues.Scale
If pScale= 0.75 Then
pDPI="120"
End If
If pScale= 1 Then
pDPI="160"
End If
If pScale= 1.5 Then
pDPI="240"
End If
If pScale=2 Then
pDPI="320"
End If
End Sub