简体   繁体   English

Android 2d和3d同步化

[英]Android 2d and 3d synchornization

Is there any way to synchronize 2d and 3d animations in android. 有没有办法在android中同步2d和3d动画。 Let me explain: i want to run a normal zoom/move/ animation of an android widget using surface view. 让我解释一下:我想使用表面视图运行android小部件的正常缩放/移动/动画。 Same time i want a 3d cube rotation using Glsurface. 同时我想使用Glsurface进行3D立方体旋转。

Can i achieve a parallel animation effect. 我可以实现平行动画效果吗?

Thanks in advance. 提前致谢。

It all depends on how you implement the animations. 这完全取决于您如何实现动画。 It could very well be enough to set the duration of both animations to exactly the same, and then start them at the same time. 将两个动画的持续时间设置为完全相同,然后同时启动它们可能就足够了。
As far as I know there is no "AnimationProgress" listener that you can use to get how far the 2d animation has progressed, so if you need a very exact synchronization of the two animations, you might be best off running your own animation thread updating the position of both objects continuously. 据我所知,没有“ AnimationProgress”侦听器可用于获取2D动画的进度,因此,如果您需要两个动画的非常精确的同步,则最好运行自己的动画线程更新两个对象的位置连续。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM