Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-11811] Android: Bring animation to parity with iOS capabilities

GitHub Issuen/a
TypeEpic
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2013-07-20T18:32:28.000+0000
Affected Version/sn/a
Fix Version/sRelease 3.2.0
ComponentsAndroid
Labelsinsight, module_animation, planning-3.2.0, qe-testadded, rock_solid
ReporterIngo Muschenetz
AssigneeBill Dawson
Created2012-11-17T08:46:21.000+0000
Updated2017-06-27T23:27:53.000+0000

Description

The Android animation system has a number of shortcomings compared to iOS, particularly with regards to 3D transforms. This epic aims to gather these separate tickets as a group so we can tackle these discrepancies.

Comments

  1. Stephen Feloney 2013-03-30

  2. Allen Yeung 2013-07-13

    PR: https://github.com/appcelerator/titanium_mobile/pull/4398
  3. Martin Guillon 2013-07-30

    If i may this is not really the way to do it. You dont have to decompose the Matrix. Just compute the Android.Graphics.Matrix, then create a MatrixEvaluator. in its set method you create a MatrixAnimation which just apply the Transformation. I did it in my private branch. Might create a PR if needed. Also using that evaluator correctly handles transformations from one matrix to another. Which your implementation doesnt. To give a little more details, here is my evaluator evaluate method
       public Ti2DMatrix evaluate(float fraction, Ti2DMatrix startValue,
       			Ti2DMatrix endValue) {
       		if (startValue != null) {
       			Matrix m = startValue.interpolate(view, 1, childWidth, childHeight, anchorX, anchorY);
       			Matrix endM = endValue.interpolate(view, fraction, childWidth, childHeight, anchorX, anchorY);
       			m.preConcat(endM);
       			return new Ti2DMatrix(m);
       		}
       		else {
       			return new Ti2DMatrix(endValue.interpolate(view, fraction, childWidth, childHeight, anchorX, anchorY));
       		}
       	}
       
    With a little trick. When you create the Evaluator the evaluator 2DMatrix must be computed using the Matrix decomposition That way you correctly compute the transformation from the current Transform
       Ti2DMatrix tdm = (Ti2DMatrix) options.get(TiC.PROPERTY_TRANSFORM);
       Ti2DMatrix tdm = layoutParams.optionTransform.invert().multiply(tdm);
       
  4. Bill Dawson 2013-07-30

    PR would be great.
  5. Lee Morris 2017-03-22

    Closing ticket as fixed.

JSON Source