[AC-2029] Windows Orientation Mode Faceup/down
GitHub Issue | n/a |
Type | Bug |
Priority | n/a |
Status | Closed |
Resolution | Cannot Reproduce |
Resolution Date | 2014-01-01T23:15:38.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | n/a |
Labels | n/a |
Reporter | Baharroth |
Assignee | Shak Hossain |
Created | 2013-12-05T10:02:34.000+0000 |
Updated | 2016-03-08T07:40:58.000+0000 |
Description
Steps to Reproduce
I try with Alloy :
-Do a window
-In TSS put orientationModes = [
Titanium.UI.PORTRAIT,
Titanium.UI.UPSIDE_PORTRAIT,
Titanium.UI.LANDSCAPE_LEFT,
Titanium.UI.LANDSCAPE_RIGHT
];
Add a Gesture eventListener to know the orientation.
Check the event of 'orientationchange' and see that faceup and down event are lunch even if we forbid those orientation in TSS.
We can create some workaround but it will be good if you can fix that :)
Regards
Actual Result
Face up and Down event are launched
Expected Result
Face up and Down event don't be launched because we force the orienation with orientationModes = [
Titanium.UI.PORTRAIT,
Titanium.UI.UPSIDE_PORTRAIT,
Titanium.UI.LANDSCAPE_LEFT,
Titanium.UI.LANDSCAPE_RIGHT
];
Attachments
Hello Baharroth, I will need some clarification on your issue. The orientationModes property should be set in your JS with your window code, not in your TSS. Also, the orientationchange event fires when the device orientation changes, not necessarily the window. If you are trying to prevent your app from being able to change to certain orientations, please take a look at this page: https://wiki.appcelerator.org/display/guides/Orientation#Orientation-Lockingapporientation These directions change a little depending on your device type. What devices are you trying this on? Could you please provide some sample code or your project so that I can reproduce the issue you are seeing? Additionally, here are some other helpful docs that explain the functions and events you reference: http://docs.appcelerator.com/titanium/latest/#!/api/Titanium.UI.Window-property-orientationModes http://docs.appcelerator.com/titanium/latest/#!/api/Titanium.Gesture-event-orientationchange
I tested this issue with the test code below. I can't reproduce this issue in latest Ti SDK (3.2.0.GA) and Alloy 1.3.0. Please check my test code and let me know if have any problem. If you are able to reproduce it using a different test case, please post it here. We will revisit it then.
Test Environment:
MAC OS X 10.8.5, Titanium SDK 3.2.0 GA Alloy 1.3.0, Ti CLI 3.2.0Test Code
index.jsindex.xml
index.tss
Thanks