Other [B4X] [quiz] - Designer layouts differences

Cableguy

Expert
Licensed User
Longtime User
The "scale" factor!
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Handle Resize?
This is the difference that I was referring to.

SS-2017-01-23_08.01.38.png


In B4A the layout is loaded once when the activity is created. Changes to the activity size (orientation change for example) will cause the activity to be destroyed and recreated.

This is not the case in B4J and B4i. The form or page are never destroyed by the OS. So the layout file is "reapplied" whenever the container size changes.
Practically it means that if you want to programmatically modify the layout then you need to do it in the resize event or the changes will be lost.
 
Last edited:
Upvote 0

ilan

Expert
Licensed User
Longtime User
this is why you should never load a layout in page1_resize event.
it will be loaded every time the resize event will be called like (orientation change) and you will have multiple views on your page.
 
Upvote 0
Top