Android Transition提供了视图层级之间的动画。
1 特点:
Group-level animations 基于组件层级
Applies one or more animation effects to all of the views in a view hierarchy.
Transition-based animation 基于过度的动画
Runs animations based on the changes between starting and ending view property values.
Built-in animations 内建动画
Includes predefined animations for common effects such as fade out or movement.
Resource file support 支持资源文件
Loads view hierarchies and built-in animations from layout resource files.
Lifecycle callbacks 生命周期回调
Defines callbacks that provide finer control over the animation and hierarchy change process.
2 框架关系
框架中Scene,Transition和Transition Manager之间的关系。
3 使用步骤:
3.1 为视图层级创建Scene,
3.2 为每一个动画创建一个Transtion
3.3 使用TransitionManager指定Transtion和结束的Scene。
4 一些限制
4.1 Transition中的动画应用在SurfaceView的时候可能不会生效.因为SurfaceView示例的更新来源于非UI线程
4.2 一些指定的Transition类型应用在TextureView可能不会生成特定的动画效果
4.3 类似ListView这种扩展了AdapterView的类与Transition 框架不兼容
4.4 如果试图调整一个TextView的动画,文字会弹出到一个新位置之前的对象已经完全调整。
翻译:http://developer.android.com/intl/zh-cn/training/transitions/overview.html