P PhilNewbie Member Jul 15, 2021 #1 I have a page with a CustomListView and a B4XImageView whose contents I want to preserve / restore when the device orientation changes. As I understand it StateManager is the routine to use. However, I'm not sure if it is possible for the custom controls or how to code it. Any help welcome.
I have a page with a CustomListView and a B4XImageView whose contents I want to preserve / restore when the device orientation changes. As I understand it StateManager is the routine to use. However, I'm not sure if it is possible for the custom controls or how to code it. Any help welcome.
Erel B4X founder Staff member Licensed User Longtime User Jul 18, 2021 #2 No. B4XPages apps are locked to a single orientation. Upvote 0
P PhilNewbie Member Jul 18, 2021 #3 Oh I have my app working happily with a change of orientation but then I only have one main page. Perhaps its a fluke and won't work for different devices. Upvote 0
Oh I have my app working happily with a change of orientation but then I only have one main page. Perhaps its a fluke and won't work for different devices.
Erel B4X founder Staff member Licensed User Longtime User Jul 18, 2021 #4 This can only happen if you modified the template code in the Main module. Upvote 0
P PhilNewbie Member Jul 18, 2021 #5 Yes, I have a couple of key variables as global and added a call in activity_resume to the sub that populates the main screen. Upvote 0
Yes, I have a couple of key variables as global and added a call in activity_resume to the sub that populates the main screen.
Erel B4X founder Staff member Licensed User Longtime User Jul 18, 2021 #6 It is a mistake but it is not related. The orientation is locked because of this line: Code: Copy #SupportedOrientations: portrait Upvote 0
It is a mistake but it is not related. The orientation is locked because of this line: Code: Copy #SupportedOrientations: portrait
Erel B4X founder Staff member Licensed User Longtime User Jul 19, 2021 #8 It will not work. You will break many things. [B4X] B4XPages - Cross platform and simple framework for managing multiple pages Upvote 0
It will not work. You will break many things. [B4X] B4XPages - Cross platform and simple framework for managing multiple pages