Landscape mode error

Hello, I have an error, my scenario is as follows: I have a home screen on which I press a button and it opens a new screen, both screens are in landscape mode. The error occurs when the button on the first screen is clicked, then the second screen opens but it starts in portrait mode and after a few seconds it changes to landscape mode. How can I do so this orientation change does not happen. By the way thank you and happy holidays to all ...

Following this guidance may help to overcome your issue?

Use different screens wisely

If you decided to use different screens, then you should switch them correctly, else you will run out of memory after a while...      
The recommended method of switching screens in App Inventor
(Thanks Taifun)
Also see demo: multiscreen.aia

Till now never used landscape orientation but now I'm developing a two screen app and same thing happens to me. Below is a simple test aia . Each screen contains only a buton to switch from one screen to another

landscape.aia (3.0 KB)

Both screens orientation is set to landscape and when changing from one screen to another for a split second orientation changes to portrait


Is there a way to fix it ? Am I doing something wrong ? Any help appreciated

Does it happen with a compiled app (apk) as well ?

Yes same thing happens and looks ugly

Actually the video is from the compiled apk

1 Like

looks ugly :frowning:

If I start the app with companion holding my device in a landscape position, then there is no switching. If I then rotate the phone to portrait i then get the switching problem. once back in landscape position problem goes away.

Tested on Google Pixel 4a Android 11

Xiaomi Mi A1 android 9 , Hold it portrait (since a user doesn't know orientation) Starts landscape , turn it and hold it in landscape position , when button pressed for a split second orientation changes to portrait and then to landscape

Can't find a fix for this, can only offer my previous advice which is to use virtual screens. Perhaps someone else can advise....

1 Like

After trying I found a work around that doesn't seem so ugly. I use a clock with time interval set to 250 and my layout is hidden. When clock.timer reaches 250 layout is set to visible and I do not see that ugly portrait-landscape change


Well done!

1 Like
1 Like

This is what i tried to describe here with openscreenanimations, but then i couldnt make a video from it. It is depends on the phone orientation and orientation sensor on phone locked or not, and the screen set landscape or sensor mode. Virtual screen is not helpinf if you want openanimations. Or you have to make your own animated virtual screen.