[AC-165] Unable to set layout for iPad in different Orientation for multiple window
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Resolved |
Resolution | Cannot Reproduce |
Resolution Date | 2015-11-14T01:59:13.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Titanium SDK & CLI |
Labels | ios |
Reporter | suraj gupta |
Assignee | Shak Hossain |
Created | 2015-06-15T12:14:55.000+0000 |
Updated | 2015-11-14T01:59:13.000+0000 |
Description
I have added eventListener for orientation change
Ti.Gesture.addEventListener('orientationchange', function(e) {
if (e.orientation === Titanium.UI.PORTRAIT || e.orientation === Titanium.UI.UPSIDE_PORTRAIT) {
alert(e.orientation);
} else if (e.orientation === Titanium.UI.LANDSCAPE_LEFT || e.orientation === Titanium.UI.LANDSCAPE_RIGHT) {
alert(e.orientation);
}
});
And when I change the orientation it is fire but when I close the window and open it again then it does not fire.
I also remove the listener on window close event
Ti.Gesture.removeEventListener('orientationchange');
if orientation is applied to one window on orientationchange event then orientationchange event for other window does not fire
Tested this issue using the sample code below. If you want to have some windows (or tabs) in one orientation and other windows in another orientation – enable each of the supported orientations in tiapp.xml, then specify each window's orientation using [win.orientationModes](http://docs.appcelerator.com/platform/latest/#!/guide/Orientation-section-29004932_Orientation Limitingorientationmodessupportedbyawindow) property. *Test Environments:* CLI Version :4.1.3 Titanium SDK Version:4.1.1.GA Device:iPad Appc Studio: Appcelerator Studio, build: 4.1.1.201507141126 Alloy: 1.7.6 Mac OS X,Version = 10.10.1. *Test Steps:* 1) Create classic project 2) Copy sample code to resource directory 3) Run project *Test code:* *app.js*
**Test Result*:* Different Orientation for multiple windows in iPad is working as expected.Check [it](http://i57.tinypic.com/25pkdxt.png) for window one and [this](http://i57.tinypic.com/1038ia0.png) for window two using tab group. If you observe different results, please post runnable sample code.