iOS Question Screen size values changing?

Sviluppatori Liceo Giovio

Member
Licensed User
I've tried to reproduce this error in a smaller project to no avail, but it seems that for whatever reason under certain circumstances the values of the screen size change (I'm logging 100%x and 100%y to check). I'm not really sure what could be causing this, but here's a brief rundown of the setup:

There is one page containing a B4XDrawer. Within the drawer's centerpanel there is a label (indicating the current "section") and a panel, which contains the content. When one of the buttons in the menu is pressed the panel is removed (using removeviewfromparent) and recreated with a different layout. This used to work just fine, but recently seems to have broken in the way I described above.

I'm not sure what could be causing this as I've tried replicating this setup but the issue did not appear. For now I'm using a band-aid fix which consists in saving the initial screen size values, and this works just fine, but I would like to get to the bottom of this.
 

watesoft

Active Member
Licensed User
I've tried to reproduce this error in a smaller project to no avail, but it seems that for whatever reason under certain circumstances the values of the screen size change (I'm logging 100%x and 100%y to check). I'm not really sure what could be causing this, but here's a brief rundown of the setup:

There is one page containing a B4XDrawer. Within the drawer's centerpanel there is a label (indicating the current "section") and a panel, which contains the content. When one of the buttons in the menu is pressed the panel is removed (using removeviewfromparent) and recreated with a different layout. This used to work just fine, but recently seems to have broken in the way I described above.

I'm not sure what could be causing this as I've tried replicating this setup but the issue did not appear. For now I'm using a band-aid fix which consists in saving the initial screen size values, and this works just fine, but I would like to get to the bottom of this.
the page width and height are only 100% accurate inside Page_Resize event,you can use page.RootPanel.Height and page.RootPanel.Width instead of 100%y and 100%x.
 
Top