Hi Everyone.
Wondering if anyone has a solution to the graphical glitch I'm experiencing with a custom barImage when opening new windows.
I have a main window with a lovely looking nav bar, styled with a custom background image. As a new window opens, either modal or normal, the barImage reverts to the original default blue.
I'm defining my core window using:
// Create home page dashboard window... var dashboardWin = Titanium.UI.createWindow({ title:'App Title', backgroundColor:'#eee', backgroundImage:'background.png', tabBarHidden:true, barImage:'titleBar.png', titleControl:null, titleImage:'title.png' });It's a strange little glitch because when working with modal windows, the blue bar only exists while the window is opening, as soon as it closes the main window has it's styled bar again!
Any thoughts on a fix would be much appreciated.
Dave.
9 Answers
Hi,
This is my solution : <br>
put this code in your app.js (at the end for exemple. I put just after tabTabGroup.open();) :
var vieHelp = Ti.UI.createWindow( { height: 0 }); vieHelp.open();it's very strange, but it works for me.
Hi guys, I also encountered a similar issue with the barImage showing up and then suddenly disappearing in an app with 5 tabs. After some investigations and some trial and error, I've found that commenting out the code at line 802 of the file TiUIWindowProxy.m in the titanium SDK (I refer to the 1.7.1 release) solved the issue for me:
-(void)_tabBlur { if (focused) { [self fireFocus:NO]; //[barImageView removeFromSuperview]; <<-- comment this code } [super _tabBlur]; }Indeed the native code that manages windows is quite complex, and probably that line is really useful for handling some corner cases, so be careful!
Thought I'd post a quick image example...
1: Styled Nav Bar http://www.my-showcase.org/media/1301/screen1.jpg
2: Style missing as new window opens http://www.my-showcase.org/media/1306/screen2.jpg
Dave.
Same problem here. Even when using a tab group with a custom navbar and opening a single window results in the default navbar, also when I explicitly set a barImage on the new window. Is this a bug?
Yeah, looks like it's a reported bug but it is currently yet to be scheduled for resolution.
http://appc.me/lh/m/2324
This is a real pain as it's making a sweet looking app appear messy when it's run :-(
Dave.
Anyone know if this has been solved? Same problem here.
Appcelerator team, we would appreciate some communication on this matter. Especially if you advise us to 'report bugs in Q&A for non-premium members'.
it works for me if i open new window via tab:
Ti.UI.currentTab.open(_win, {animated:true});it ll keep its barImage. but there is little flash each time i first time open any window. default background appears for couple of milliseconds and just after that my barImage appear.
What's the status on this issue? Should be fixed by now.
Your Answer
Think you can help? Login to answer this question!