简体   繁体   English

如何在Android平台上实现复杂的动画

[英]How to implement complicated animation at android platform

Now i am developing an android app, and there are lots of animations and image resources, the ui design and the logic are also very complex. 现在我正在开发一个Android应用程序,并且有很多动画和图像资源,UI设计和逻辑也非常复杂。
I tried to use the Tween animation and android layout to implement, but the code is very complex, and i also can't implement some parts of animations. 我尝试使用Tween动画和android布局来实现,但是代码非常复杂,而且我也无法实现动画的某些部分。 Anyone know how to handle such complex animation at the android platform? 有人知道如何在android平台上处理这种复杂的动画吗? Dose android have some tool like as flash tool to design the animation? 剂量android有一些像flash工具这样的工具来设计动画吗?

In android three type of anmiations. 在android中,三种类型的anamiations。

1)TranslateAnimation 1)翻译动画

An animation that controls the position of an object 控制对象位置的动画

2)ScaleAnimation 2)ScaleAnimation

An animation that controls the scale of an object. 控制对象比例的动画。 You can specify the point to use for the center of scaling. 您可以指定用于缩放中心的点。

3)AlphaAnimation 3)AlphaAnimation

An animation that controls the alpha level of an object. 控制对象的Alpha级别的动画。 Useful for fading things in and out. 有助于淡入淡出事物。 This animation ends up changing the alpha property of a Transformation 该动画最终更改了转换的alpha属性

Check this for some example. 请查看此示例。

You can use droidQuery for complex animations. 您可以将droidQuery用于复杂的动画。 For example, to animate all your ImageView s to double their current size, do: 例如,要为所有ImageView设置动画以使其当前大小加倍,请执行以下操作:

$.with(this).selectByType(ImageView.class)
            .animate("{width:200%, height:200%}", 
                     new AnimationOptions().easing($.Easing.BOUNCE).duration(400));

You can highly customize your animation with chained methods on the AnimationOptions Object - from the duration and interpolator to callbacks for progress, errors, success, and completion, etc. 您可以使用AnimationOptions对象上的链接方法高度自定义动画-从持续时间和插值器到进度,错误,成功和完成等的回调。

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

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