Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-8642] iOS: hide and show view with vertical layout will redraw the view with layout absolute

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionDuplicate
Resolution Date2012-04-16T11:58:55.000+0000
Affected Version/sRelease 1.8.2
Fix Version/sn/a
ComponentsiOS
LabelsSupportTeam, api
ReporterEduardo Gomez
AssigneeVishal Duggal
Created2012-04-09T18:31:15.000+0000
Updated2017-03-09T22:48:02.000+0000

Description

Issue

When we hide an show view with vertical layout it redraw the view with layout absolute.

Steps to reproduce

1. Click the window (yellow area) 2. Watch out the view

Expected behavior

View being shown as per it's layout settings

Repro sequence

- app.js
var win = Ti.UI.createWindow({
    backgroundColor:'yellow',
});
 
win.addEventListener('click', function(){
	view.hide();
	setTimeout(function(){
		view.show();
	},3000);	
});

var view = Ti.UI.createView({
	layout:'vertical',
	backgroundColor:'red',
	height:'50%'
});
  
win.add(view);
 
var left = Ti.UI.createLabel({
    title:'Left',
    backgroundColor:'blue',
    color:'black',
    width:'50%',
    height:'100%'
});
 
var right = Ti.UI.createLabel({
    title:'Right',
    backgroundColor:'green',
    color:'black',
    width:'50%',
    height:'100%'
});
 
view.add(left);
view.add(right);
 
win.open();

Comments

  1. Vishal Duggal 2012-04-16

    Test Code
       var win = Ti.UI.createWindow({
           backgroundColor:'yellow',
       });
         
       win.addEventListener('click', function(){
           view.hide();
           setTimeout(function(){
               view.show();
           },3000);    
       });
        
       var view = Ti.UI.createView({
           layout:'vertical',
           backgroundColor:'red',
           height:'50%'
       });
          
       win.add(view);
         
       var left = Ti.UI.createLabel({
           title:'Left',
           backgroundColor:'blue',
           color:'black',
           width:'50%',
           height:'50'
       });
         
       var right = Ti.UI.createLabel({
           title:'Right',
           backgroundColor:'green',
           color:'black',
           width:'50%',
           height:'50'
       });
         
       view.add(left);
       view.add(right);
       win.open();
       
  2. Vishal Duggal 2012-04-16

    Already fixed in master and 2_0_X as part of TIMOB-5268
  3. Neeraj Gupta 2012-04-16

    Duplicate of TIMOB-5268.
  4. Lee Morris 2017-03-09

    Closing ticket as duplicate.

JSON Source