The problem is simple: when I try to close a view with the focus of another tab and then back to the main tab , you can see the previous view for a few milliseconds
explanatory video attached
- Create a new mobile project (classic titanium)
- Add the following code (into app.js).
// 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({
visible : false
});
tabGroup.addEventListener("focus" , function(e){
if (view_test.opacity == 1 && tabGroup.visible) {
view_test.top = Ti.Platform.displayCaps.platformHeight;
}
});
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);
var view_test = Ti.UI.createView({
width : 320,
height : Ti.Platform.displayCaps.platformHeight,
backgroundColor : "black",
opacity : 1,
top : Ti.Platform.displayCaps.platformHeight
});
var label_test = Ti.UI.createLabel({
text : "Close",
color : "white"
});
view_test.add(label_test);
label1.addEventListener("click",function(e){
view_test.animate({
top : 0,
duration : 300
});
});
label_test.addEventListener("click",function(e){
view_test.animate({
opacity : 0,
duration : 300
});
setTimeout(function(e) {
view_test.animate({
opacity : 1,
duration : 300
});
view_test.top = Ti.Platform.displayCaps.platformHeight;
}, 300);
});
win1.add(view_test);
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);
tabGroup.addTab(tab1);
tabGroup.addTab(tab2);
tabGroup.open();
setTimeout(function(e){
tabGroup.visible = true;
},2000);
no one has yet performed some test?
Thanks for your report! The Platform team will be setting the priority on this one.
Issue still exists with SDK Version 3.3.0 and 3.4.0 Titanium Command-Line Interface, CLI version 3.3.0, Titanium SDK version 3.3.0.GA Titanium SDK version 3.4.0.GA Appcelerator Studio, build: 3.3.0.201407111535 iOS SDK: 7.1 iOS iPhone Simulator: 7.1
Issue still exists with SDK Version 3.4.1
+1