Hide navigation bar when screen orientation changes

I want to hide the navigation bar when the phone is rotated to landscape mode. I don’t want to limit the user to any orientation, so my screen orientation is “Unspecified” but when the user changes orientation I want to know. Here is the block I’m using right now:

You see here, I made my research and used some of the oldest community posts’ solutions. The problem here is Screen1.Screen Orientation doesn’t return “landscape” or “portrait”, it only returns “sensor”. What is the problem here, and how can I fix it?


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.