Force portrait mode for Android on Appcelerator
Just drop this on your app.js file:
if (Ti.Platform.osname.match(/android/g)){
Ti.Gesture.addEventListener('orientationchange', function(e) {
Ti.Android.currentActivity.setRequestedOrientation(Ti.Android.SCREEN_ORIENTATION_PORTRAIT);
});
}
Written by Juan G. Hurtado
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Android
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#