dcp
September 28, 2021, 5:46pm
1
Following up on Basic Canvas question from 18 months ago... it appears that the Screen1.ScreenOrientationChanged
event is generated significantly before (100s of milliseconds) Screen1.Width
and Screen1.Height
are updated.
As the subject asks, 'What is the correct way to detect Screen1 Portrait versus Landscape?'
Thanks.
— dcp
TIMAI2
September 28, 2021, 5:48pm
2
Probably
Screen1.ScreenOrientationChanged
but it depends on what you need from that!
1 Like
Taifun
September 29, 2021, 3:54am
3
If screen width > height
Then landscape
Else portrait
Taifun
3 Likes
dcp
September 29, 2021, 5:00pm
4
If screen width > height
Then landscape
Else portrait
Reorient | mit-app-inventor Um... except not.
I guess you can use this block
from this extension
Today, I am here with a new aix to get device info 🙂 Blocks Library used Credits @sneha_sharma for awesome library About me a 13 y.o kiddo 🙂 Issues/Bugs Report all issues / bugs you face here Download DevyInfo (18).aix...
Reading time: 3 mins 🕑
Likes: 112 ❤
Taifun
September 29, 2021, 6:17pm
6
dcp:
Um... except not
yes, this is not immediately.... therefore just use a clock to get some delay as that article describes...
Taifun
Anke
September 29, 2021, 6:27pm
7
https://community.appinventor.mit.edu/t/screen-orientation/42415/5?u=anke
Sorry the link is from the power user forum (thanks Taifun for the hint).