我在钛Appcelerator的有问题orientationchange
。当标签之间移动,纵向之间横向&切换时不会触发该事件orientationchange
。钛Appcelerator的orientationchange不会发生
这里是我的代码
Titanium.Gesture.addEventListener('orientationchange', function(e){
var alertDialog = Ti.UI.createAlertDialog({
title: "Alert",
message: "Orientation is "+ e.orientation,
buttonNames: ['OK'],
cancel:0
});
alertDialog.show();
});
这里的再现步骤:
- 切换到选项卡,然后进入横向模式(出现警报)。
- 切换回选项卡1,旋转手机进入人像模式(警报不会出现)。
- 该事件不会发生。 (后续事件像往常一样火(出现警报))
任何人都有一个解决办法的想法? 我需要这个,因为我必须改变视图onorientationchange
。 我使用Appcelerator的钛1.2.2,移动版1.6,API 2.2
我都试过,但警报不会出现。这个问题不orientationchange从来没有火,但在orientationchange这种背景下不火:这里是再现步骤: 1.切换到选项卡,然后进入横向模式(出现警报)。 2.切换回标签页1,将手机旋转至肖像模式(不出现提示)。 3.事件不会发生。 (随后发生的事件照常发生(警报出现)) aniway谢谢 – Mark 2011-03-28 17:20:01