S Scantech Well-Known Member Licensed User Longtime User Mar 25, 2019 #1 logging lv.ApproximateScreenSize returns "NaN" with 10inch emulator. what is NaN? Should it return a number instead of NaN?
logging lv.ApproximateScreenSize returns "NaN" with 10inch emulator. what is NaN? Should it return a number instead of NaN?
DonManfred Expert Licensed User Longtime User Mar 25, 2019 #2 What is lv? B4X: log(GetDeviceLayoutValues.ApproximateScreenSize) Upvote 0
S Scantech Well-Known Member Licensed User Longtime User Mar 26, 2019 #3 Oops. My code was B4X: Dim lv As LayoutValues Should be B4X: 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
Oops. My code was B4X: Dim lv As LayoutValues Should be B4X: 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.
udg Expert Licensed User Longtime User Mar 28, 2019 #4 what is NaN? Click to expand... NaN = Not a Number Upvote 0
klaus Expert Licensed User Longtime User Mar 28, 2019 #5 You can replace: B4X: Dim lv As LayoutValues lv = GetDeviceLayoutValues simply by this, as DonManfred already showed: B4X: GetDeviceLayoutValues.ApproximateScreenSize You can use GetDeviceLayoutValues directly, no need to Dim a LayoutValues object. Upvote 0
You can replace: B4X: Dim lv As LayoutValues lv = GetDeviceLayoutValues simply by this, as DonManfred already showed: B4X: GetDeviceLayoutValues.ApproximateScreenSize You can use GetDeviceLayoutValues directly, no need to Dim a LayoutValues object.