[TIMOB-10086] Android: Window: Honeycomb - BackgroundColor of new window not shown when new window opened in a tab
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2013-06-21T08:54:04.000+0000 |
Affected Version/s | Release 2.1.1 |
Fix Version/s | Release 3.1.0, 2012 Sprint 24, 2012 Sprint 24 API |
Components | Android |
Labels | api, module_window, qe-and070112, qe-testadded |
Reporter | Satyam Sekhri |
Assignee | Ping Wang |
Created | 2012-07-23T10:56:24.000+0000 |
Updated | 2013-06-21T08:54:04.000+0000 |
Description
The BackgroundColor of new window not shown when new window opened in a tab. This happens only on Android Honeycomb and works fine when tested on Froyo, Gingerbread and ICS.
This is not a regression. The issue occurs atleast since 2.0.2
Steps to Reproduce:
1. Create an application with code below
2. Launch the application
3. Under Tab1, Click on 'Open Win3' button
Actual: The win3 opens up under tab1 and has no background color
Expected: The window win3 should open up with blue background color
// this sets the background color of the master UIView (when there are no windows/tab groups on it)
Titanium.UI.setBackgroundColor('#000');
var win1 = Titanium.UI.createWindow({
title:'Tab 1',
backgroundColor:'#fff'
});
var button = Ti.UI.createButton({
title:'open win3',
width:200,
height:100
});
win1.add(button);
var win2 = Titanium.UI.createWindow({
title:'Tab 2',
backgroundColor:'#fff'
});
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);
var win3 = Ti.UI.createWindow({
title:'foobar',
backgroundColor:'blue',
});
var button2 = Ti.UI.createButton({
title:'back to win1',
width:200,
height:100,
backgroundColor:'white'
});
win3.add(button2);
button.addEventListener('click', function(){
win3.open();
});
button2.addEventListener('click', function(){
win3.close()
});
// create tab group
var tabGroup = Titanium.UI.createTabGroup();
var tab1 = Titanium.UI.createTab({
icon:'KS_nav_views.png',
title:'Tab 1',
window:win1
});
var tab2 = Titanium.UI.createTab({
icon:'KS_nav_ui.png',
title:'Tab 2',
window:win2
});
tabGroup.addTab(tab1);
tabGroup.addTab(tab2);
tabGroup.open();
Another simple test case:
PR: https://github.com/appcelerator/titanium_mobile/pull/3408 Run the two test cases above. The new windows should open correctly.
Tested with: SDK:3.1.0.v20130114171802 Studio:3.0.1.201212181159 Device: Samsung tab(v 3.2)
Reopening just to update label
Updated label and verified. Tested on: Device: Nexus tab Android Version 3.2 SDK:3.1.2.v20130619101604 Appcelerator Studio: 3.1.1.201306131423 OS: OSX 10.8 acs:1.0.3 alloy:1.1.3 npm:1.2.14 titanium:3.1.1 titanium-code-processor:1.0.1