[TIMOB-15338] Android orientationModes not working
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Closed |
Resolution | Cannot Reproduce |
Resolution Date | 2014-09-12T11:44:46.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Android |
Labels | android, orientation, orientationmodes, window |
Reporter | Ezoom Agency |
Assignee | Ingo Muschenetz |
Created | 2013-09-24T19:45:28.000+0000 |
Updated | 2017-03-21T21:41:54.000+0000 |
Description
Setting *"orientationModes = [Ti.UI.PORTRAIT];"* has no effect on android, as windows continue to change to other orientation
Used to work on TI 2.x, not working anymore on TI 3.x
// this sets the background color of the master UIView (when there are no windows/tab groups on it)
Titanium.UI.setBackgroundColor('#000');
// create tab group
var tabGroup = Titanium.UI.createTabGroup();
// create controls tab and root window
var win1 = Titanium.UI.createWindow({
title:'Tab 1',
backgroundColor:'#fff',
orientationModes: [Ti.UI.PORTRAIT],
});
win1.orientationModes = [Ti.UI.PORTRAIT];
var tab1 = Titanium.UI.createTab({
icon:'KS_nav_views.png',
title:'Tab 1',
window:win1
});
var label1 = Titanium.UI.createLabel({
color:'#999',
text:'I am Window 1',
font:{fontSize:20,fontFamily:'Helvetica Neue'},
textAlign:'center',
width:'auto'
});
win1.add(label1);
// create controls tab and root window
var win2 = Titanium.UI.createWindow({
title:'Tab 2',
backgroundColor:'#fff'
});
var tab2 = Titanium.UI.createTab({
icon:'KS_nav_ui.png',
title:'Tab 2',
window:win2
});
var label2 = Titanium.UI.createLabel({
color:'#999',
text:'I am Window 2',
font:{fontSize:20,fontFamily:'Helvetica Neue'},
textAlign:'center',
width:'auto'
});
win2.add(label2);
//
// add tabs
//
tabGroup.addTab(tab1);
tabGroup.addTab(tab2);
// open tab group
tabGroup.open();
Clean example:
Tried with latest master, I couldn't reproduce the problem, it is working as expected.
Cannot reproduce Titanium SDK version 3.4.0 master, 3.3.0.GA, 3.2.0.GA Titanium Studio, build: 3.3.0.201407100905 Titanium Command-Line Interface CLI version 3.3.0, Android device : Motorola Moto G, Android version : 4.4.4
Closing ticket as the issue cannot be reproduced and due to the above comments.