[AC-5614] Ti.Gesture has 3 orientation
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2018-02-23T18:35:29.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | n/a |
Labels | n/a |
Reporter | Guile |
Assignee | Shak Hossain |
Created | 2018-02-22T17:30:29.000+0000 |
Updated | 2018-02-23T18:35:29.000+0000 |
Description
IOS SDK 7.0.2GA
It is possible to have Gesture.portrait == false and Gesture.landscape == false
Ti.Gesture.addEventListener('orientationchange', function (e) {
Ti.API.info('source.portrait:' + e.source.portrait + ' source.landscape:' + e.source.landscape);
});
You only have to put your tablet on a table (horizontaly)
This is inconsistent.
This is not a bug. This is the correct behavior.
Ti.Gesture
provides the device's orientation, not the app window's orientation. So, when you lay the tablet flat on a table, theTi.Gesture.orientation
property will return FACE_UP if the screen is facing up towards the sky or FACE_DOWN if the screen is facing down towards the Earth. The device will only return true forportrait
orlandscape
when the device is held upright, but note that this does not represent the orientation of the app window. If you want to know the orientation of your app window, then you should read theTi.UI.Window.orientation
property instead. http://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.Window-property-orientationYou are right ! Sorry for the wrong issue. I misused these informations since the beginning
No worries. Happy to help!