Skip to content

Instantly share code, notes, and snippets.

@juanghurtado
Created September 3, 2012 08:58
Show Gist options
  • Save juanghurtado/3607984 to your computer and use it in GitHub Desktop.
Save juanghurtado/3607984 to your computer and use it in GitHub Desktop.
Force portrait mode for Android on Appcelerator
if (Ti.Platform.osname.match(/android/g)){
Ti.Gesture.addEventListener('orientationchange', function(e) {
Ti.Android.currentActivity.setRequestedOrientation(Ti.Android.SCREEN_ORIENTATION_PORTRAIT);
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment