Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-11993] Android: Simple Animation Applied to a View doesn't play nice

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2013-04-18T21:37:38.000+0000
Affected Version/sRelease 2.1.4, Release 3.0.0, Release 3.1.0
Fix Version/s2013 Sprint 08 API, Release 3.2.0
ComponentsAndroid
Labelsexalture, insight, module_animation, parity, qe-testadded
ReporterEduardo Gomez
AssigneeSunila
Created2012-12-07T17:21:38.000+0000
Updated2014-06-19T12:43:31.000+0000

Description

Problem

It looks like our "Simple Animation Applied to a View" doesn't play nice in Android.

Tested on

Razr 2.3.5 iOS 6 simulator

Docs

http://docs.appcelerator.com/titanium/2.1/#!/api/Titanium.UI.Animation

Simple sample

var win = Titanium.UI.createWindow({
	backgroundColor : '#FFF',
});

var view = Titanium.UI.createView({
	backgroundColor : 'red'
});

var animation = Titanium.UI.createAnimation();
animation.backgroundColor = 'black';
animation.duration = 3000;

var animationHandler = function() {
	animation.removeEventListener('complete', animationHandler);
	animation.backgroundColor = 'orange';
	view.animate(animation);
};

animation.addEventListener('complete', animationHandler);
view.animate(animation);

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

Comments

  1. Shameer Jan 2013-03-14

    The problem reproduces with release 3.0.2 and master release 3.1.0 tested on Titanium Studio, build: 3.0.2.201302191606 Titanium SDK version: 3.1.0 Titanium SDK version: 3.0.2 Device: Samsung galaxy s duos Android version: 4.0.4 Android Emulator: Android SDK version: 2.2 iOS iPhone Simulator: iOS SDK version: 6.0 It works fine on IOS iphone simulator
  2. Sunila 2013-04-18

    Added backgroundcolor propertyaccessor annotation https://github.com/appcelerator/titanium_mobile/pull/4183
  3. Ping Wang 2013-04-18

    After the fix, the background color animates but does not work the same as iOS. The color changes from red to black smoothly but at the end of the first animation, the background color goes back to red. And then it changes to orange. This issue has been already filed in TIMOB-6852 and TIMOB-12141. So resolve this ticket as Fixed.
  4. Federico Casali 2013-10-18

    Verified fixed. TiSDK 3.2.0.v20131017152001 CLI 3.2.0 Titanium Studio 3.2.0.201310152326 Closing.

JSON Source