本文介绍了活动之间的切换与Java动画(编程定义)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如果我已经在XML定义我的动画,然后我可以活动之间的动画像
If i have my animations defined in xml then i can animate between activities like
//Calls a new Activity
startActivity(new Intent(this, NewActivity.class));
//Set the transition -> method available from Android 2.0 and beyond
overridePendingTransition(R.anim.push_left_in,R.anim.push_up_out);
但是我对Java的定义我的动画。功能overridePendingTransition(INT,INT)发生INT论据动画。如何使用编程方式定义动画呢?
But I have my animation defined in Java. Function "overridePendingTransition(int , int)" takes int arguments for animations. How can I use programmatically defined animations instead?
推荐答案
我找到了解决方案,这在这里
http://blog.robert-heim.de/karriere/android-startactivity-rotate-3d-animation-activityswitcher/comment-page-1/#comment-12025
I Found out solution for this herehttp://blog.robert-heim.de/karriere/android-startactivity-rotate-3d-animation-activityswitcher/comment-page-1/#comment-12025
这篇关于活动之间的切换与Java动画(编程定义)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!