Change the orientation of a page #9976
-
Is your feature request related to a problem? Please describe.I need my application to work in Portrait and a particular activity in Landscape and that it be permanent, that is, it does not change due to device rotation Describe the solution you'd likebeing able to define a page with a specific orientation different from the other pages of the application and blocking its change when moving the device. Describe alternatives you've consideredI used the "nativescript-orientation" plugin to perform this action but after migrating to Nativescript 8 I realase that the plugin became a paid plugin. I cannot afford the required prices and am looking for an alternative that will allow me to do so. Anything else?No response Please accept these terms
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
here is a solution that I found and works for me: I created a util.js file and put this.
and used like this
|
Beta Was this translation helpful? Give feedback.
-
Also, you can use this plugin https://github.com/NativeScript-Use/NativeScript-Use/tree/main/packages/nativescript-orientation and lock orientation as: orientation.disableRotation(); |
Beta Was this translation helpful? Give feedback.
here is a solution that I found and works for me:
I created a util.js file and put this.