I want to fix portrait mode in all time I tried it in titanium sdk 4, the code is
if (Ti.Platform.osname == 'android'){
Ti.Gesture.addEventListener('orientationchange', function(e)
{
Ti.Android.currentActivity.setRequestedOrientation(Ti.Android.SCREEN_ORIENTATION_PORTRAIT);
});
}
it is not works in titanium sdk 5.0.2
We have a guide specifically about locking the orientation:
https://appcelerator.github.io/appc-docs/latest/#!/guide/Orientation