Sauroo Park

unread,
May 12, 2019, 12:56:42 AM5/12/19
to MIT App Inventor Forum
Hello I am a student

I would like to know if the app can detect whether the screen orientation is portrait or landscape without actually setting the screen orientation to portrait or landscape in the screen properties.
if the app can detect that, how can i use the if statement for the screen orientation? for instance,  << if (screen1. screen orientation) = (portrait) then >>
doesn't work. does anybody know why?

Sincerely,
Sauroo Park

BodyMindPower

unread,
May 12, 2019, 1:32:48 AM5/12/19
to MIT App Inventor Forum
It takes some time (e.g., 10ms) for the device to recognize the screen orientation, so use a clock component (TimerIntervall=100).



Anke
Reply all
Reply to author
Forward
0 new messages