Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-12141] Android: Unable to animate from the last position/condition

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2013-07-20T18:18:31.000+0000
Affected Version/sn/a
Fix Version/sRelease 3.2.0
ComponentsAndroid
Labelsinsight, qe-closed-3.2.0
ReporterIngo Muschenetz
AssigneeIngo Muschenetz
Created2012-12-20T23:52:51.000+0000
Updated2013-11-19T00:00:38.000+0000

Description

In the case of animations which change size or coordinates, this is basically a duplicate of TIMOB-1101. But others like color or opacity animations are special. If you run an animation on a view (such as an opacity animation) and then later run another one, you of course want the newer animation to start from what is the current visible state of the view on screen. For example, if you animated to 50% animation and want to now animate to 100% opacity, you want this second animation to obviously start at 50% and move to 100%. With old Android animation, the actual properties of the view do not change after the animation is complete. And there are no properties available to tell you what the view currently looks like (post-first-animation). So in the example, at the time I want to make the second animation (to 100%) there is no property I can check that will tell me that it's currently at 50% opacity, and for the second animation I must tell it the "starting" opacity. So Ti Android has ugly code in there to set variables to "remember" the last-animated-to-opacity (and color, etc.) It's ugly.

Comments

  1. Ping Wang 2013-04-18

    A test case of color animation is in TIMOB-11993.
  2. Allen Yeung 2013-07-20

    Resolved as a part of https://github.com/appcelerator/titanium_mobile/pull/4398
  3. Samuel Dowse 2013-11-19

    Verified fixed on: Mac OSX 10.9 Mavericks Titanium Studio, build: 3.2.0.201311160316 Titanium SDK, build: 3.2.0.v20131118142443 CLI: 3.2.0-alpha Alloy: 1.3.0 Tested using test cases from TIMOB-11993 and TIMOB-6852 and both do as expected. Closing.

JSON Source