Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-11203] iOS: Views: View on window with vertical layout first drawn from left top then to the center (top).

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2013-01-04T10:24:47.000+0000
Affected Version/sRelease 2.1.3
Fix Version/sRelease 3.0.1, Release 3.1.0, 2013 Sprint 01 API, 2013 Sprint 01
ComponentsiOS
Labelsapi, module_views, qe-ios090112, qe-testadded, regression
ReporterNeha Chhabra
AssigneeVishal Duggal
Created2012-09-28T09:03:40.000+0000
Updated2013-01-07T02:56:40.000+0000

Description

View on window with vertical layout first drawn from left top then to the center(top). This is a regression.It does not occurs on 2.1.2.GA Steps to Reproduce: 1. Install and launch the app on device. 2. Click on the button "click" Actual Result: After Step2: The red view initially appears left top of the screen for a moment and then moves to the center(top) as if it is animated. Expected Result: It should appear in center (top). app.js
var win1 = Ti.UI.createWindow({
	 
	    title :'Win 1',
		layout :'vertical',
		backgroundColor :'#fff'
});

var btn=Ti.UI.createButton({
	
	title:'click'
	
})

win1.add(btn);

btn.addEventListener('click', function(e){
	

var win = Ti.UI.createWindow({
	 
	    title :'Win 1',
		layout :'vertical',
		backgroundColor :'white'
});
		 
		var vw1 = Ti.UI.createView({
		    layout:'horizontal',
		    backgroundColor:'red',
		    width:'100',
		    height:75,
		   
		});
		win.add(vw1);
		 
		
win.open();

});

win1.open();

Comments

  1. Ingo Muschenetz 2012-09-28

    I notice that the difference in code between this one and TIMOB-11194 is line 29, where in TIMOB-11194, the width is "100%" and here, the width is "100". Is that intentional? What happens if you test with the exact same release as TIMOB-11194 was closed against?
  2. Blain Hamon 2012-09-28

    Whoops. Grabbed wrong one.
  3. Satyam Sekhri 2012-12-21

    The issue still exists on SDK 3.0.0.GA The width was intentionally set to "100" so that the view does not cover up the whole width of the screen and then only left to center horizontal movement of the view can be noticed. The test in TIMOB-11194 where the width was 100% reported view first drawn in vertical centre of screen and then move to the top, hence width of the view did not matter in that test. Also the behaviour in the current ticket was noticed only after the build in which TIMOB-11194 was closed. Prior to that build the behaviour reported in TIMOB-11194 only used to occur.
  4. Vishal Duggal 2013-01-03

    Pull pending https://github.com/appcelerator/titanium_mobile/pull/3657
  5. Sabil Rahim 2013-01-04

    CR & FR
  6. Sabil Rahim 2013-01-04

    Needs backport to 3_0_X branch
  7. Vishal Duggal 2013-01-04

    Backport PR https://github.com/appcelerator/titanium_mobile/pull/3660
  8. Shyam Bhadauria 2013-01-07

    Verified with following Titanium SDK: 3.1.0.v20130105233407 Titanium SDK:3.0.1.v20130105233204 Titanium Studio:3.0.1.201212181159 Device: Simulator 6.0

JSON Source