Problem description
Size issue when changing a tabbedBar in a Toolbar to visible from invisible
Steps to reproduce
Run the sample code below.
First tabbedBar it's invisible. When set to visible, it actually expand to the maximum Toolbar size.
This is not reproducible using TiSDK 2.0.1.v20120412163344
It's reproducible from 2.0.2 GA
Sample code
// this sets the background color of the master UIView (when there are no windows/tab groups on it)
var win = Titanium.UI.createWindow({
layout : 'vertical'
});
var btn = Ti.UI.createButton({
title : 'Toggle!'
});
var tabbedBar1 = Ti.UI.iOS.createTabbedBar({
labels : ['One', 'Two'],
visible: false
});
//tabbedBar1.visible = vis;
var tabbedBar2 = Ti.UI.iOS.createTabbedBar({
labels : ['Three', 'Four']
});
var flexSpace = Ti.UI.createButton({
systemButton : Titanium.UI.iPhone.SystemButton.FLEXIBLE_SPACE
});
btn.addEventListener('click', function(e){
if(tabbedBar1.visible == false){
tabbedBar1.visible = true;
} else {
tabbedBar1.visible = false;
}
Ti.API.info(tabbedBar1.visible);
});
win.add(btn);
win.setToolbar([tabbedBar1, flexSpace, tabbedBar2]);
win.open({
modal : true
});
Can you please point out what the steps are to reproduce this bug? Is the repositioning of the tabbedBar the bug? Or is that a something that happens in the code? Please be more clear in the description, and as always, samples of test code to show the error make your point much more clear and easy to fix.
Gionvani, I am posting some code that I think may be the bug you are experiencing please respond confirming this is the behavior you are describing. Thank you. Carter
Giovani, Here is a workaround that will fix this problem for the meantime. I am moving this bug to TiMob and will respond shortly with the ticket information. Thank you for bringing this to our attention. Thanks, Carter
it is already fix in 3.0.2.
Closing ticket as the issue cannot be reproduced.