GitHub Issue | n/a |
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2012-12-07T23:30:20.000+0000 |
Affected Version/s | Release 2.1.3, Release 2.1.4 |
Fix Version/s | Release 3.1.0, 2012 Sprint 25, 2012 Sprint 25 API |
Components | iOS |
Labels | SupportTeam, module_view, qe-testadded, regression |
Reporter | Eduardo Gomez |
Assignee | Vishal Duggal |
Created | 2012-12-04T19:21:48.000+0000 |
Updated | 2014-07-04T11:00:39.000+0000 |
Issue
Background gradient is taking time and is applying after the window is opened appearing as if some animation has been applied to the view.
Reproduction steps
1. Click the button
2. backgroundGradient is applied to the view after the window opening.
3. Monitor how the backgroundGradient got animated
Expected
Ti 2.1.2.GA does not animates the backgroundGradient.
Actual
Ti 2.1.3.GA+, animation is performed.
Tested on
iOS simulator 5
iPhone 4 - iOS 6
Repro sequence
- app.js
var w = Ti.UI.createWindow({
backgroundColor:'white'
});
var b = Ti.UI.createButton({
title:'click'
});
w.add(b);
w.open();
var data = {
spName : 'Specialty',
id : 100,
name : 'Name',
addr : 'Address',
};
var sam = require('sam');
b.addEventListener('click',function(e){
new sam(data).open();
});
- sam.js
function Request(data) {
var appointmentWindow = Titanium.UI.createWindow({
layout : 'vertical'
});
var scrollView = Ti.UI.createScrollView({
contentHeight : Ti.UI.SIZE,
bottom : 20,
layout : 'vertical',
showVerticalScrollIndicator : true
});
var doctorInfo = Ti.UI.createView({
height : Ti.UI.SIZE,
width : Ti.UI.FILL
});
var bgGradient_ios = {
type : 'linear',
startPoint : {
x : '0%',
y : '100%'
},
endPoint : {
x : '100%',
y : '0%'
},
colors : [{
color : '#2500A0DF',
offset : 0.75
}, {
color : '#5500A0DF',
offset : 0.25
}]
};
var doctorInfoView = Ti.UI.createView({
layout : 'horizontal',
height : Ti.UI.SIZE,
width : Ti.UI.FILL,
horizontalWrap : false,
top : 10,
backgroundGradient : bgGradient_ios,
});
var doctorDetail = Ti.UI.createView({
height : Ti.UI.SIZE,
left : '5%',
layout : 'vertical',
top : 7,
width : Ti.UI.FILL,
bottom : 3
});
doctorInfoView.add(doctorDetail);
var doctorNameLbl = Titanium.UI.createLabel({
text : data.name,
font : {
fontSize : 14,
fontWeight : 'bold',
},
color : 'black',
left : 0
});
doctorDetail.add(doctorNameLbl);
var doctorSpecialtyLbl = Titanium.UI.createLabel({
text : data.spName,
color : 'black',
left : 0,
font : {
fontSize : 12
}
});
doctorDetail.add(doctorSpecialtyLbl);
var doctorAddressLbl = Titanium.UI.createLabel({
text : data.addr,
color : 'black',
left : 0,
font : {
fontSize : 12
}
});
doctorDetail.add(doctorAddressLbl);
doctorInfo.add(doctorInfoView);
scrollView.add(doctorInfo);
appointmentWindow.add(scrollView);
return appointmentWindow;
};
module.exports = Request;
Same issue.
It is working fine now without animation. Environment used for verification - Titanium SDK: 3.1.0.v20130114171802 Titanium Studio:3.0.1.201212181159 Device : Simulator 6.0 , iphone 4S iOS 5.1