Android Question lv.ApproximateScreenSize return value

Scantech

Well-Known Member
Licensed User
Longtime User
logging lv.ApproximateScreenSize returns "NaN" with 10inch emulator. what is NaN? Should it return a number instead of NaN?
 
What is lv?

Code:
 log(GetDeviceLayoutValues.ApproximateScreenSize)
 
Upvote 0
Oops.

My code was
Code:
    Dim lv As LayoutValues

Should be
Code:
    Dim lv As LayoutValues
    lv = GetDeviceLayoutValues

Now it works good.

but i spotted some kind of bug(not using lv = GetDeviceLayoutValues). If statement being true was based on log being added or not. I will create a new thread for this. This is probably another bug i spotted.
 
Upvote 0
Upvote 0
You can replace:
Code:
Dim lv As LayoutValues
lv = GetDeviceLayoutValues
simply by this, as DonManfred already showed:
Code:
GetDeviceLayoutValues.ApproximateScreenSize
You can use GetDeviceLayoutValues directly, no need to Dim a LayoutValues object.
 
Upvote 0
Back
Top