Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-13132] Android: animation rotate doesn't interpolate linearly

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2013-08-19T21:53:04.000+0000
Affected Version/sn/a
Fix Version/s2013 Sprint 17, 2013 Sprint 17 API, Release 3.2.0
ComponentsAndroid
Labelsandroid, animation, module_animation
ReporterJong Eun Lee
AssigneeBill Dawson
Created2013-03-14T15:47:11.000+0000
Updated2013-10-22T00:00:15.000+0000

Description

Problem description

Android animation interpolate ease-in-ease-out, but [Documentation says](http://docs.appcelerator.com/titanium/latest/#!/api/Titanium.UI.Animation): Android Platform Notes: Animations always interpolate linearly between the start state and the end state.

Steps to reproduce

Test this code.
var win = Ti.UI.createWindow({
    backgroundColor : 'white'
});

var view = Ti.UI.createView({
    backgroundColor : 'red',
    width : 100,
    height : 100
});

win.add(view);
win.open();

var animation = Titanium.UI.createAnimation();
animation.duration = 30000;
animation.transform = Ti.UI.create2DMatrix().rotate(180);
view.animate(animation);

Comments

  1. Davide Cassenti 2013-03-14

    Hello, What do you exactly mean? What are you trying to achieve with the animation, and how does the bug affects your app? Thanks
  2. Jong Eun Lee 2013-03-14

    According to [wiki](http://docs.appcelerator.com/titanium/latest/#!/api/Titanium.UI.Animation), Rotate animation on Android should interpolate linearly.View should rotate same speed. But rotate animation on Android interpolate ease-in-easy-out. 1) View start rotate start(low speed.) 2) getting speed. 3) lose speed. 4) animation end I want to implementation *linear* rotate animation. Is it enough explain? Sorry, I'm not good at English. Thanks.
  3. Davide Cassenti 2013-03-20

    Thanks. I moved the bug to TIMOB-13132
  4. Bill Dawson 2013-08-16

    PR ready: https://github.com/appcelerator/titanium_mobile/pull/4577 Test is precisely the code above given by the reporter.
  5. Federico Casali 2013-10-21

    Verified fixed. TiSDK 3.2.0.v20131018154951 CLI 3.2.0 Titanium Studio 3.2.0.201310181940 Closing.

JSON Source