Hi to Everybody here
till to day, I have developed some Apps, which are basically technical Apps requiring no "virtousity" on User interface. Therefore I simply forced Screen orientation to Portrait, i designed my Layouts with the VisualDesigner and I had no problems. Now I have the need to have runtime changes in orientation. I use B4x pages. There are some issues on which I need some help. There are some posts here, but, due to Android and B4a changes along the time, I am not sure on the best approach to solve my problems. Unluckily the App was not designed keeping in account of orientation changes. First of all, I see that, if I change orientation, the App restarts. My App has a first Layout, say "0", which manages some initial issues, then a second layout "1" is called and the most of work is done here. When I change orientation during the work on "1" layout, the App restarts with "0" page, and I lose everything. I need an hint on how to manage this crucial fact. Then, what is better to do to display a new layout "1" ? Make a variant or manage the control positions in another layout, loaded at orientation changes? Note that the change of orientation may happen at any time, not necessarily when the "1" layout is loaded. Btw the "0" layout has no problems of orientation and is rather simple. Thanks in advance for any hint.
till to day, I have developed some Apps, which are basically technical Apps requiring no "virtousity" on User interface. Therefore I simply forced Screen orientation to Portrait, i designed my Layouts with the VisualDesigner and I had no problems. Now I have the need to have runtime changes in orientation. I use B4x pages. There are some issues on which I need some help. There are some posts here, but, due to Android and B4a changes along the time, I am not sure on the best approach to solve my problems. Unluckily the App was not designed keeping in account of orientation changes. First of all, I see that, if I change orientation, the App restarts. My App has a first Layout, say "0", which manages some initial issues, then a second layout "1" is called and the most of work is done here. When I change orientation during the work on "1" layout, the App restarts with "0" page, and I lose everything. I need an hint on how to manage this crucial fact. Then, what is better to do to display a new layout "1" ? Make a variant or manage the control positions in another layout, loaded at orientation changes? Note that the change of orientation may happen at any time, not necessarily when the "1" layout is loaded. Btw the "0" layout has no problems of orientation and is rather simple. Thanks in advance for any hint.