[AC-286] Screen shrinks when forcefully set the app in landscape mode
| GitHub Issue | n/a |
| Type | Bug |
| Priority | n/a |
| Status | Resolved |
| Resolution | Cannot Reproduce |
| Resolution Date | 2015-11-14T01:11:10.000+0000 |
| Affected Version/s | n/a |
| Fix Version/s | n/a |
| Components | Titanium SDK & CLI |
| Labels | n/a |
| Reporter | Manjula |
| Assignee | Shak Hossain |
| Created | 2015-08-05T09:30:26.000+0000 |
| Updated | 2015-11-14T01:11:10.000+0000 |
Description
I have dashboard screen with many icons with four tabs, clicking the icons will open the seperate windows. Among the icons only one window is set to landscape and others are set in both landscape and portrait mode.
When device is in landscape mode and launching the window(which is set to landscape forcefully), the screen momentarily appears as shrinked in landscape mode and then quickly stretches back to appear normally in landscape mode.
Note : Am not using any setTimeout function before opening the window
Attachments
[~manjudpm] can you please attach a test case and steps to reproduce the issue? thanks
Hello, We Tested this issue using the sample code below. The screen works as expected when forcefully set the app in landscape mode. If you continue get the unexpected screen settings, please post a sample code that we can test. *Test Environments:* CLI Version :4.1.3 Titanium SDK Version:4.1.1.GA, Device:iPad Appc Studio: Appcelerator Studio, build: 4.1.1.201507141126 Alloy: 1.7.6 Mac OS X,Version = 10.10.1. *Test Steps*: * Create a classic project * Run with sample code. *Test Code:*
*Test Result:* Here among of four windows, second window which is set to landscape forcefully) does not shrink. Thanks// 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 base UI tab and root window // var win1 = Titanium.UI.createWindow({ title:'Tab 1', backgroundColor:'#fff' }); win1.orientationModes = [Ti.UI.PORTRAIT, Ti.UI.UPSIDE_PORTRAIT,Titanium.UI.LANDSCAPE_LEFT,Titanium.UI.LANDSCAPE_RIGHT]; 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' }); win2.orientationModes = [Titanium.UI.LANDSCAPE_LEFT]; 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); // //create controls tab and root window // var win3 = Titanium.UI.createWindow({ title:'Tab 3', backgroundColor:'pink' }); win3.orientationModes = [Ti.UI.PORTRAIT, Ti.UI.UPSIDE_PORTRAIT,Titanium.UI.LANDSCAPE_LEFT,Titanium.UI.LANDSCAPE_RIGHT]; var tab3 = Titanium.UI.createTab({ icon:'KS_nav_ui.png', title:'Tab 3', window:win3 }); var label3 = Titanium.UI.createLabel({ color:'#999', text:'I am Window 3', font:{fontSize:20,fontFamily:'Helvetica Neue'}, textAlign:'center', width:'auto' }); win3.add(label3); //create controls tab and root window // var win4 = Titanium.UI.createWindow({ title:'Tab 4', backgroundColor:'orange' }); win4.orientationModes = [Ti.UI.PORTRAIT, Ti.UI.UPSIDE_PORTRAIT,Titanium.UI.LANDSCAPE_LEFT,Titanium.UI.LANDSCAPE_RIGHT]; var tab4 = Titanium.UI.createTab({ icon:'KS_nav_ui.png', title:'Tab 4', window:win4 }); var label4 = Titanium.UI.createLabel({ color:'#999', text:'I am Window 4', font:{fontSize:20,fontFamily:'Helvetica Neue'}, textAlign:'center', width:'auto' }); win4.add(label4); // // add tabs // tabGroup.addTab(tab1); tabGroup.addTab(tab2); tabGroup.addTab(tab3); tabGroup.addTab(tab4); // open tab group tabGroup.open();