Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-17466] [iOS] TabGroup Event : Problem with the refresh of Components after a focus of Tab

GitHub Issuen/a
TypeBug
PriorityNone
StatusOpen
ResolutionUnresolved
Affected Version/sRelease 3.3.0
Fix Version/sn/a
ComponentsiOS
LabelsTCSupport, ios
Reporternicolomonili
AssigneeUnknown
Created2014-07-28T19:06:42.000+0000
Updated2018-02-28T20:04:05.000+0000

Description

Problem Description

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

Steps to reproduce

- 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);

Attachments

FileDateSize
video test.mov2014-07-28T19:07:40.000+0000832948

Comments

  1. nicolomonili 2014-08-06

    no one has yet performed some test?
  2. Mauro Parra-Miranda 2014-08-06

    Thanks for your report! The Platform team will be setting the priority on this one.
  3. Shameer Jan 2014-08-27

    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
  4. nicolomonili 2014-11-21

    Issue still exists with SDK Version 3.4.1
  5. nicolomonili 2015-09-28

    +1

JSON Source