Android Question SupportedOrientations Question

小小伍伍

New Member
Hello everyone, I'm new here and transitioning from VB to B4A for app development. Could someone help me? I'm working on a project using B4A's B4XPages, as shown in the example in the attachment. The issue is with #SupportedOrientations: unspecified. When I enter the B4XMainPage or userMainPage, rotating the phone to landscape or portrait mode triggers the Main's Activity_Create() event, causing the phone to display a blank screen. Why does this happen? How can I ensure that the previous page remains displayed after rotating the phone? For example, if I'm on the userMainPage, I want it to stay visible after rotating the phone.
 

Attachments

  • HESS.zip
    13.5 KB · Views: 7

teddybear

Well-Known Member
Licensed User
Hello everyone, I'm new here and transitioning from VB to B4A for app development. Could someone help me? I'm working on a project using B4A's B4XPages, as shown in the example in the attachment. The issue is with #SupportedOrientations: unspecified. When I enter the B4XMainPage or userMainPage, rotating the phone to landscape or portrait mode triggers the Main's Activity_Create() event, causing the phone to display a blank screen. Why does this happen? How can I ensure that the previous page remains displayed after rotating the phone? For example, if I'm on the userMainPage, I want it to stay visible after rotating the phone.
1.Don't modify the sub Activity_Resume of B4XPage project. it is the reason caused the phone to display a blank screen.
2.Remember current page,show current page when B4XPage_Appear of B4XMainPage. perhaps you need a new layout for the orientation

Project is attached
 

Attachments

  • HESS1.zip
    13.1 KB · Views: 6
Last edited:
Upvote 0
Top