Created
February 12, 2022 00:18
-
-
Save kakha13/bf22fa929e1c8ba83d20ff9e70fecf20 to your computer and use it in GitHub Desktop.
Nativescript block rotate on Phone
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if(Device.deviceType == "Phone") { | |
const activity = Application.android.startActivity; | |
activity.setRequestedOrientation(android.content.pm.ActivityInfo.SCREEN_ORIENTATION_SENSOR_PORTRAIT); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment