Hi all
Been beating my head against a wall all day today but finally worked out how to handle getting the DPI of any android device.... To help anyone else who may suffer in the same way, here's how..
Identify a static control on your window (IMG_Menu in my case)
Since in the WM editor everything is always based on 160DPI you can use the CoordinateScreenToEditor command to work out what the DPI is.
all variables have 2 decimal places..
nX = CoordinateScreenToEditor(IMG_Menu..X)
gnDPIRatio = Round(IMG_Menu..X / nX,2)
MyDPI = 160 * gnDPIRatio
Boom!
Been beating my head against a wall all day today but finally worked out how to handle getting the DPI of any android device.... To help anyone else who may suffer in the same way, here's how..
Identify a static control on your window (IMG_Menu in my case)
Since in the WM editor everything is always based on 160DPI you can use the CoordinateScreenToEditor command to work out what the DPI is.
all variables have 2 decimal places..
nX = CoordinateScreenToEditor(IMG_Menu..X)
gnDPIRatio = Round(IMG_Menu..X / nX,2)
MyDPI = 160 * gnDPIRatio
Boom!