[TIMOB-11203] iOS: Views: View on window with vertical layout first drawn from left top then to the center (top).
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2013-01-04T10:24:47.000+0000 |
Affected Version/s | Release 2.1.3 |
Fix Version/s | Release 3.0.1, Release 3.1.0, 2013 Sprint 01 API, 2013 Sprint 01 |
Components | iOS |
Labels | api, module_views, qe-ios090112, qe-testadded, regression |
Reporter | Neha Chhabra |
Assignee | Vishal Duggal |
Created | 2012-09-28T09:03:40.000+0000 |
Updated | 2013-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();
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?
Whoops. Grabbed wrong one.
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.
Pull pending https://github.com/appcelerator/titanium_mobile/pull/3657
CR & FR
Needs backport to 3_0_X branch
Backport PR https://github.com/appcelerator/titanium_mobile/pull/3660
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