Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-17199] Android: Orientation does not change for Window inside tabGroup

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionWon't Fix
Resolution Date2014-10-24T17:31:37.000+0000
Affected Version/sRelease 3.3.0
Fix Version/sn/a
ComponentsAndroid
Labelsparity, qe-3.3.0
ReporterPriya Agarwal
AssigneeIngo Muschenetz
Created2014-06-24T07:00:44.000+0000
Updated2017-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

Comments

  1. Samuel Dowse 2014-06-24

    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.
  2. Sai Suman Mallela 2014-08-05

    Has this issue been resolved yet???
  3. Ingo Muschenetz 2014-08-14

    3.4.0 is moved forward, and 3.5.0 is taking its place in the calendar.
  4. jithinpv 2014-08-27

    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
  5. Sunila 2014-09-02

    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.
  6. Sai Suman Mallela 2014-09-03

    I was able to control the orientation change using the below code:
       var self = Ti.UI.createTabGroup();
       
       var activity = self.getActivity();
       		  if(activity)
       		  activity.requestedOrientation = Titanium.Android.SCREEN_ORIENTATION_PORTRAIT;
       
  7. Ingo Muschenetz 2014-10-24

    This is not considered to be a good UX design. For those interested in utilizing this functionality, we suggest using the workaround.
  8. Lee Morris 2017-03-23

    Closing ticket as Won't Fix with reference to the above comments.

JSON Source