Skip to content

Instantly share code, notes, and snippets.

@kakha13
Created February 12, 2022 00:18
Show Gist options
  • Save kakha13/bf22fa929e1c8ba83d20ff9e70fecf20 to your computer and use it in GitHub Desktop.
Save kakha13/bf22fa929e1c8ba83d20ff9e70fecf20 to your computer and use it in GitHub Desktop.
Nativescript block rotate on Phone
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