我想一直修复肖像模式 我在钛sdk 4中试过它,代码是
if (Ti.Platform.osname == 'android'){
Ti.Gesture.addEventListener('orientationchange', function(e)
{
Ti.Android.currentActivity.setRequestedOrientation(Ti.Android.SCREEN_ORIENTATION_PORTRAIT);
});
}
它不适用于钛sdk 5.0.2
答案 0 :(得分:0)
我们专门提供了关于锁定方向的指南:
https://appcelerator.github.io/appc-docs/latest/#!/guide/Orientation