Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-15803] Android: Add Matrix3D support

GitHub Issuen/a
TypeNew Feature
PriorityLow
StatusOpen
ResolutionUnresolved
Affected Version/sn/a
Fix Version/sn/a
ComponentsAndroid
Labels3DMatrix, android, animation, matrix, parity
ReporterRadamantis Torres-Lechuga
AssigneeJoshua Quick
Created2013-11-23T00:09:50.000+0000
Updated2020-04-29T21:21:54.000+0000

Description

*Summary:* On Android, we should add Matrix3D support like iOS. https://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.Matrix3D *Use Case:* App devs would like to implement "flip" animations in a cross-platform manner. *Work-Around:* The Titanium View type has the following Android-only properties that allow you to manipulate the view in 3D. Unfortunately, you can use these via our animation APIs. * [rotationX](https://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.View-property-rotationX) * [rotationY](https://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.View-property-rotationY) * [translationZ](https://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.View-property-translationZ) *Recommended Solution:* Android already has a 3D matrix Java class that we can leverage. https://developer.android.com/reference/android/graphics/Matrix We can apply 2D and 3D matix animations by deriving our own Animation Java class and apply the matrix transformations via its applyTransformation() method. https://developer.android.com/reference/android/view/animation/Animation Examples that are similar to what we want (but not exactly) are... https://github.com/Miserlou/Android-SDK-Samples/blob/master/ApiDemos/src/com/example/android/apis/animation/Rotate3dAnimation.java https://stackoverflow.com/a/57388468 We might want to consider refactoring our Ti2DMatrix Java class to use Google's Matrix class as well. This would require a major refactoring of our animation code.

Comments

No comments

JSON Source