[TIMOB-8814] BlackBerry: Implement UI.Animation
GitHub Issue | n/a |
---|---|
Type | Sub-task |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2014-05-23T20:45:57.000+0000 |
Affected Version/s | n/a |
Fix Version/s | 2013 Sprint 10 BB, 2013 Sprint 10, Release 3.2.0, Release 3.4.0 |
Components | BlackBerry |
Labels | qe-3.3.0 |
Reporter | Francois Boisvert |
Assignee | Pedro Enrique |
Created | 2012-04-20T09:51:30.000+0000 |
Updated | 2014-07-08T17:45:15.000+0000 |
Description
The Animation object defines an animation that can be applied to a view.
An animation object describes the properties of an animation. At its most basic, an animation object represents a single-phase animation with an end state and a duration.
This is actually an abstract idea that doesn't directly map to iOS, but instead represents a set of properties, the values to change them to, and the duration over which these values should change.
Acceptance Test
var win = Ti.UI.createWindow({
title : 'Window',
backgroundColor : '#28292c',
barColor : '#28292c'
});
var view = Ti.UI.createView({
top: 10,
left: 10,
width: 100,
height: 100,
backgroundColor: 'red'
});
var btn1 = Ti.UI.createButton({
title: 'left 10, top: 10, opacity: 0.3',
bottom: 60
});
var btn2 = Ti.UI.createButton({
title: 'left: 200, top: 100, duration: 2000, opacity: 1',
bottom: 0,
});
win.add(btn1);
win.add(btn2);
win.add(view);
btn1.addEventListener('click', function(){
var animation = Ti.UI.createAnimation({
left: 10,
top: 10,
opacity: 0.3,
duration: 1000
});
view.animate(animation);
});
btn2.addEventListener('click', function(){
view.animate({
left: 200,
top: 100,
duration: 2000,
opacity: 1
}, function(e){
alert('end');
Ti.API.info(this);
Ti.API.info(JSON.stringify(this));
});
});
win.open();
sz: Cascades has specific animation applied to each object as well. Check ImplicitAnimtationController …
Pull Request for basic animations: https://github.com/appcelerator/titanium_mobile_blackberry/pull/35
Do not resolve until pull request is merged.
Tested the above code. App crashes when tap on 'left 10, top:10, opacity: 0.3' button. Appcelerator Studio, build: 3.3.0.201405161313 Titanium SDK, build: 3.3.0.v20140521174951 Node.JS Version: v0.10.13 NPM Version: 1.3.2 acs@1.0.14 alloy@1.4.0-alpha2 npm@1.3.2 titanium@3.3.0-alpha5 titanium-code-processor@1.1.1 Device: BB Z10 (10.2.1)
PR for master: https://github.com/appcelerator/titanium_mobile_blackberry/pull/242 PR for 3.3.X:https://github.com/appcelerator/titanium_mobile_blackberry/pull/243
Closing as fixed, no crash. Mac osx 10.9.4 Mavericks Appcelerator Studio, build: 3.3.0.201407031747 Titanium SDK, build: 3.3.0.v20140707105712 Node.JS Version: v0.10.28 NPM Version: 1.4.9 acs@1.0.15 alloy@1.4.0-rc4 npm@1.4.9 titanium@3.3.0-rc4 titanium-code-processor@1.1.1 Device: BB Z10 (10.2.1)