[TIMOB-17199] Android: Orientation does not change for Window inside tabGroup
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Won't Fix |
Resolution Date | 2014-10-24T17:31:37.000+0000 |
Affected Version/s | Release 3.3.0 |
Fix Version/s | n/a |
Components | Android |
Labels | parity, qe-3.3.0 |
Reporter | Priya Agarwal |
Assignee | Ingo Muschenetz |
Created | 2014-06-24T07:00:44.000+0000 |
Updated | 2017-03-23T22:44:30.000+0000 |
Description
Orientation does not change When orientation modes property set on Window inside TabGroup.
var tabGroup = Titanium.UI.createTabGroup();
var win1 = Titanium.UI.createWindow({
title:'Tab 1',
orientationModes: [Titanium.UI.LANDSCAPE_LEFT]
});
var tab1 = Titanium.UI.createTab({
title:'Tab 1',
window:win1
});
var win2 = Titanium.UI.createWindow({
title:'Tab 2',
orientationModes: [Titanium.UI.PORTRAIT]
});
var tab2 = Titanium.UI.createTab({
title:'Tab 2',
window:win2
});
tabGroup.addTab(tab1);
tabGroup.addTab(tab2);
tabGroup.open();
*Steps to reproduce:*
1.Copy Paste the code on app.js and run the app.
2. Click on Tab2.
Expected Result:
1. App opens in landscape mode, having two tabs sharing 50 % width.
2. App opens in portrait mode, having two tabs sharing 50 % width.
Actual Result:
1. App launches in portrait mode.
2. Tab 2 gets actives and app remains on portrait mode.
Window's orientation modes does not gets changed.
Not a regression.
Working fine for iOS
Verified on: Mac OSX 10.9.3 Appcelerator Studio, build: 3.3.0.201406231625 Titanium SDK, build: 3.3.0.v20140623161712 Titanium CLI, build: 3.3.0-rc2 Alloy: 1.4.0-rc2 Device: Nexus 4 (4.2) App opens in portrait instead of landscape.
Has this issue been resolved yet???
3.4.0 is moved forward, and 3.5.0 is taking its place in the calendar.
Issue reproduces in Android and works fine in iOS Titanium SDK version 3.4.0 master, 3.3.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 iOS simulator : iPhone Retina (3.5-inch), iOS 7.0.3
In Android, orientation is associated with the activity but tab windows doesn't have its own activity and setting orientationmodes for tab windows doesn't have any effect.
I was able to control the orientation change using the below code:
This is not considered to be a good UX design. For those interested in utilizing this functionality, we suggest using the workaround.
Closing ticket as Won't Fix with reference to the above comments.