I'm not sure what you mean about "correctly handle orientation changes", but the simplest answer is that you create a layout for portrait orientation and one for landscape, then when the device changes orientation, Android loads the appropriate one.
If you are referring to the fact that when the device is rotated, your app restarts and the user loses his position in the app as well as any data, then see the first two subjects on this page in the Documentation Wiki.
I guess I've been reading so much info on B4A I'm a bit lost at this point regarding designing my Landscape layout and how the switching between the two is handled in my code.
My app has Activity.LoadLayout("Main") so this means that Main is my primary or main screen layout design right? It's portrait. But now I'm ready to design the landscape layout.
So in the Designer I would do File New and create a new Abstract Designer layout right? Normally what would you name this landscape layout? Main is the portrait layout so landscape would be??? I don't know if there is a naming convention here.
So I design my landscape layout and save this new layout and I know I can load it using the LoadLayout() function but where do I detect the orientation change in order to load the landscape layout? What Sub?
You can save more than one layout in one layout file. So you would simply save the landscape layout also to your main layout file. Like this you have portrait and landscape in the same layout file. Your program will automatically load the correct one.
So I design my landscape layout and save this new layout and I know I can load it using the LoadLayout() function but where do I detect the orientation change in order to load the landscape layout? What Sub?
You can save more than one layout in one layout file. So you would simply save the landscape layout also to your main layout file. Like this you have portrait and landscape in the same layout file. Your program will automatically load the correct one.
So in the Abstract Designer, from the Layout menu, I would select my desired landscape mode and then setup my design in landscape. Then I'm still in 'Main' but now I have two layouts? I'm not clear on how 'to save the landscape layout' to my main layout file?
So in the attached image, I have opened a landscape layout and will position my components accordingly. But how do I save it when I'm done?
Sorry I'm not picking this up...I just can't wrap my head around this yet. I'm still trying to figure this out. Thanks.