Hello,
App. type: mobile Android: 2.3 Titanium Build: 1.0.6.201110251616
I have created a simple application with 4 tabs following the basic example. When I run the application and switch between the tabs there is visible flashing of the whole screen. Is this a known issue or a regular state? Any solution?
3 Answers
Hi Vladimir
if you following any custom tab example then might be that the problem well the default tab demo which we can find from the kitchen sink is working good but then also try on the device it might solve the problem with the device. But try to share the code will sure check it. Also we now have some good updates in Ti 1.7.6 and 1.8.0.1 so you surely use those.
Regards
Nikunj
Hello Nikunj,
Thanks for response.
I have downloaded, installed and upgraded the newest version of the Titanium Studio. I am using Samsung Galaxy Tab with Android 2.2 but the same problem appears when I run the application in the emulator.
When I start the application, if I click on the second tab I see flashing (blink effect) while screen is changing. If I click on the next tab I also see flashing. But if I click on one of the tabs that was open before, there is no flashing.
This is the code:
// 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' }); 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' }); 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); var win3 = Titanium.UI.createWindow({ title:'Tab 3', backgroundColor:'#aaa' }); var tab3 = Titanium.UI.createTab({ icon:'KS_nav_ui.png', title:'Tab 3', window:win3 }); var label3 = Titanium.UI.createLabel({ color:'#999', text:'This is just an example', font:{fontSize:20,fontFamily:'Helvetica Neue'}, textAlign:'center', width:'auto' }); win3.add(label3); var win4 = Titanium.UI.createWindow({ title:'Tab 4', backgroundColor:'#fff' }); var tab4 = Titanium.UI.createTab({ icon:'KS_nav_ui.png', title:'Tab 4', window:win4 }); var label4 = Titanium.UI.createLabel({ color:'#999', text:'This is just an example text', 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();
Hey, I found a solution.
I had windows with a white background, and they would flash to black for a split second, the first time I switched to them.
What I did to fix it, was to set the background color of the TabGroup to white, as well.
http://developer.appcelerator.com/apidoc/mobile/1.8.1/Titanium.UI.TabGroup.setBackgroundColor-method.html
Hope this helps, cheers
Your Answer
Think you can help? Login to answer this question!