[AC-3147] Orientation problems on tabbed application (ios - iphone)
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Closed |
Resolution | Needs more info |
Resolution Date | 2011-12-23T03:52:30.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Titanium SDK & CLI |
Labels | ios, iphone, orientation, tabgroup |
Reporter | Fabrizio Riccardo |
Assignee | Paul Dowsett |
Created | 2011-12-19T07:57:45.000+0000 |
Updated | 2016-03-08T07:48:13.000+0000 |
Description
I've created a simple app with 2 tabs.
On creating windows, i've specified portait orientation for window1 and landscape for window2.
Once clicked on tab2, window2 turn correctly in landscape, but when i click again on tab1, app does not turn in portait mode.
Ti.include(
Titanium.Filesystem.resourcesDirectory+'home.js'
);
(function() {
var win = Ti.UI.createWindow(),
tabGroup = Titanium.UI.createTabGroup({
id : 'mainTabGroup'
}),
win1 = createWin1({}),
win2 = createWin2({}),
tab1 = Titanium.UI.createTab({
id : 'tab1',
title : 'Tab1'
}),
tab2 = Titanium.UI.createTab({
id : 'tab2',
title : 'Tab2'
});
tab1.window = win1;
tab2.window = win2;
tabGroup.addTab(tab1);
tabGroup.addTab(tab2);
win.add(tabGroup);
tabGroup.open({
transition : Titanium.UI.iPhone.AnimationStyle.FLIP_FROM_LEFT
});
})();
(function() {
createWin1 = function(_args) {
var win1 = Ti.UI.createWindow({
title:'win1',
backgroundColor:'#fff',
orientationModes: [
Titanium.UI.PORTRAIT
]
}),
label1 = Ti.UI.createLabel({
text:'Window 1',
width: '100%',
height: '100%',
textAlign:'center'
});
win1.add(label1);
return win1;
}
createWin2 = function(_args) {
var win2 = Ti.UI.createWindow({
title:'win2',
backgroundColor:'#fff',
orientationModes: [
Titanium.UI.LANDSCAPE_LEFT,
Titanium.UI.LANDSCAPE_RIGHT
]
}),
label2 = Ti.UI.createLabel({
text:'Window 2',
width: '100%',
height: '100%',
textAlign:'center'
});
win2.add(label2);
return win2;
}
})();
<iphone>
<orientations device="iphone">
<orientation>Ti.UI.PORTRAIT</orientation>
</orientations>
<orientations device="ipad">
<orientation>Ti.UI.PORTRAIT</orientation>
<orientation>Ti.UI.UPSIDE_PORTRAIT</orientation>
<orientation>Ti.UI.LANDSCAPE_LEFT</orientation>
<orientation>Ti.UI.LANDSCAPE_RIGHT</orientation>
</orientations>
</iphone>
Fabrizio Would you provide the link to the [Q&A question](http://developer.appcelerator.com/questions/created) you created about this, that is a prerequisite to raising tickets? Also, in order for me to escalate this ticket to the core team, it must follow the [JIRA Ticket Checklist](https://wiki.appcelerator.org/display/guides/How+to+Submit+a+Bug+Report#HowtoSubmitaBugReport-JIRATicketChecklist). I will close this for now. Please reopen it once it is complete, and I will move it to the main project. Thanks
Closing due to inactivity. If this issue still exists, please raise a new ticket, including all the information in the [JIRA Ticket Checklist](https://wiki.appcelerator.org/display/guides/How+to+Submit+a+Bug+Report#HowtoSubmitaBugReport-JIRATicketChecklist) to ensure that we can escalate it quickly. Read [How to Submit a Bug Report](https://wiki.appcelerator.org/display/guides/How+to+Submit+a+Bug+Report) if you have not read it before, and always start a ticket using the [JIRA Ticket Template](https://wiki.appcelerator.org/display/guides/JIRA+Ticket+Template). Thanks in advance