GitHub Issue | n/a |
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2012-02-14T23:35:17.000+0000 |
Affected Version/s | Release 1.8.0.1, Release 2.0.0, Release 1.8.1 |
Fix Version/s | Sprint 2012-04, Release 2.0.0, Release 1.8.2 |
Components | iOS |
Labels | barImage, module_tabbedbar, parity, qe-testadded |
Reporter | Matt Bryson |
Assignee | Vishal Duggal |
Created | 2012-02-03T16:28:08.000+0000 |
Updated | 2012-03-03T22:56:26.000+0000 |
Problem description
When you create a tab with two windows with different barImages, you will get the first barImage in the second window as well, even if it has a different barImage defined. In the animation, the second barImage will show, producing an non desired color effect.
Actual results
You will only see the barImage defined in the first window.
Expected results
Each window should have their own barImage shown.
Test case
Create a tabNavigation group with 1 tab.
Add a custom barImage to the main window.
Open a sub window with tabGroup.currentTab.open. That sub window contains a different barImage.
The correct bar image appears on 2nd window. Press back button
Then navigate to the the second window AGAIN
This time the root window bar image is present and NOT the 2nd window bar image.
// 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',
barImage:'nav_bg.png',
tabBarHidden:true
});
var button = Ti.UI.createButton({
title:'open',
width:100,
height:50
});
button.addEventListener('click', function() {
//win2.open();
tabGroup.activeTab.open( win2 );
})
win1.add(button);
var win2 = Titanium.UI.createWindow({
title:'Tab 2',
backgroundColor:'#fff',
barImage:'nav_bg_2.png',
});
var tab1 = Titanium.UI.createTab({
title:'Tab 1',
window:win1
});
tabGroup.addTab(tab1);
// open tab group
tabGroup.open();
Extra info
The attached project includes above code and two images.
I have added a sample project that does this, in fact, in the sample its worse, it shows the 2nd bar image as the window animates on, and then reverts to the first one.
The barImages for the example
Pull pending https://github.com/appcelerator/titanium_mobile/pull/1406
Closing issue Tested with Ti Studio build 1.0.8.201201262211 Ti Mob SDK 1.9.0.v20120212011634 OSX Lion 10.7.3 iPhone 4S OS 5.0.1 Verified that the expected results are shown