过渡动画的库,比系统提供的实现类要丰富

Recolor

TransitionManager.beginDelayedTransition(linearLayout,new Recolor());
textView.setTextColor(Color.CYAN);
textView.setBackground(getDrawable(R.color.colorAccent));//用Recolor来设置颜色修改后的动画

Rotate

TransitionManager.beginDelayedTransition(linearLayout,new Rotate());
imageView.setRotation(90);//用Rotate来设置旋转的动画

ChangeText

TransitionManager.beginDelayedTransition(linearLayout,new ChangeText().setChangeBehavior(CHANGE_BEHAVIOR_IN));
textView.setText("我是修改后的");//用ChangeText来设置改变文本后的动画

Scale

TransitionManager.beginDelayedTransition(linearLayout,new Scale(0.1f));
imageView.setVisibility(View.GONE);//用Scale来设置视图的显示情况的动画

参考文章
//www.greatytc.com/p/98f2ec280945
https://github.com/andkulikov/Transitions-Everywhere

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容