Using various ABM methods, I am getting some curious results with some - affecting my code to handle different device layouts.
The following examples shows results from phone, tablet and desktop:
Here is the phone log results. Everything looks fine with this...
Here is the tablet results:
Page.GetCurrentPageSize states the screen / device is "initial" (and not Tablet). What the heck is an "initial"
Trying to use this method - on a tablet will not provide the proper layout for the login form (which is altered based on device detected).
Here are results from desktop where the browser is resized to simulate different devices:
Browser window shrunk to simulate phone.
The page.GetCurrentPageSize result - states "phone", but the page.IsDesktop result states "true"
Browser window shrunk to simulate tablet:
Same issue - correct currentpagesize, but still states - isDesktop = True...
Browser window expanded to simulate desktop:
This is all fine...
Thanks for input...
The following examples shows results from phone, tablet and desktop:
Here is the phone log results. Everything looks fine with this...
B4X:
ABM.GetBrowserWidthHeight(page) - Actual Screen Width: 360 and Height: 518
---
page.GetCurrentPageSize result: phone
page.Isphone result: true
page.IsTablet result: false
page.IsDesktop result: false
---
Here is the tablet results:
Page.GetCurrentPageSize states the screen / device is "initial" (and not Tablet). What the heck is an "initial"
Trying to use this method - on a tablet will not provide the proper layout for the login form (which is altered based on device detected).
B4X:
ABM.GetBrowserWidthHeight(page) - Actual Screen Width: 962 and Height: 482
---
page.GetCurrentPageSize result: initial
page.Isphone result: false
page.IsTablet result: true
page.IsDesktop result: false
---
Here are results from desktop where the browser is resized to simulate different devices:
Browser window shrunk to simulate phone.
The page.GetCurrentPageSize result - states "phone", but the page.IsDesktop result states "true"
B4X:
ABM.GetBrowserWidthHeight(page) - Actual Screen Width: 483 and Height: 533
---
page.GetCurrentPageSize result: phone
page.Isphone result: false
page.IsTablet result: false
page.IsDesktop result: true
---
Browser window shrunk to simulate tablet:
Same issue - correct currentpagesize, but still states - isDesktop = True...
B4X:
ABM.GetBrowserWidthHeight(page) - Actual Screen Width: 921 and Height: 716
---
page.GetCurrentPageSize result: tablet
page.Isphone result: false
page.IsTablet result: false
page.IsDesktop result: true
---
Browser window expanded to simulate desktop:
This is all fine...
B4X:
ABM.GetBrowserWidthHeight(page) - Actual Screen Width: 1678 and Height: 960
---
page.GetCurrentPageSize result: desktop
page.Isphone result: false
page.IsTablet result: false
page.IsDesktop result: true
---
Thanks for input...