I want to use some tabs with some content only in landscape mode. That doesn't work.
var win = Titanium.UI.createWindow({
backgroundColor : '#fff',
title : 'X'
});
var win1 = Titanium.UI.createWindow({
backgroundColor : '#fff',
title : 'Y'
});
win.orientationModes = [
//Titanium.UI.PORTRAIT,
Titanium.UI.LANDSCAPE_LEFT];
win1.orientationModes = [
//Titanium.UI.PORTRAIT,
Titanium.UI.LANDSCAPE_LEFT];
// create tab group
var tabGroup = Titanium.UI.createTabGroup();
var tab1 = Titanium.UI.createTab({
icon:'KS_nav_views.png',
title:'FirstTab',
window:win
});
var tab2 = Titanium.UI.createTab({
icon:'KS_nav_views.png',
title:'SecondTab',
window:win1
});
// Create a Label.
var aLabel1 = Ti.UI.createLabel({
text : 'TEST1',
color : 'red',
font : {fontSize:20},
height : 24,
width : 80,
top : 20,
left : 20,
textAlign : 'center'
});
// Create a Label.
var aLabel2 = Ti.UI.createLabel({
text : 'TEST2',
color : 'red',
font : {fontSize:20},
height : 24,
width : 80,
top : 20,
left : 20,
textAlign : 'center'
});
// Add to the parent view.
win.add(aLabel1);
win1.add(aLabel2);
tabGroup.addTab(tab1);
tabGroup.addTab(tab2);
tabGroup.open();
The problem reproduces with release 3.0.2 and master release 3.1.0 tested on Titanium Studio, build: 3.0.2.201302191606 Titanium SDK version: 3.1.0 Titanium SDK version: 3.0.2 Device: Samsung galaxy s duos Android version: 4.0.4 Android Emulator: Android SDK version: 2.2 iOS iPhone Simulator: iOS SDK version: 6.0 It works fine on IOS iphone simulator
I am able to reproduce this issue with the following environment; Pixel (7.1) Studio 4.9.0.201705302345 Ti SDK 6.1.1 GA Appc NPM 4.2.9 Appc CLI 6.2.2 Ti CLI 5.0.14 Alloy 1.9.11 Xcode 8.2 (8C38) Node v4.8.2 Java 1.8.0_131
In the documentation it is noted that this property will not be supported for windows inside TabGroup: https://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.Window-property-orientationModes TabGroup itself respects the property and opens in the proper orientation. Is the desired effect to show the content only of a specific tab with a locked orientation and to use the auto-chosen for the rest?