动画同时改变方向 [英] Animation while changing orientation
本文介绍了动画同时改变方向的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否有可能设置动画
当我们从横向视图的活动转移到纵向视图的活动?
Is it possible to set animation
when we move from an activity in landscape view to an activity in portrait view ?
推荐答案
这是可能的,但不是小事。此属性添加到您的<活性GT;
在的AndroidManifest.xml
文件:
It's possible, but not trivial. Add this property to your <activity>
in your AndroidManifest.xml
file:
android:configChanges="orientation|keyboard|keyboardHidden"
然后,覆盖您的活动的<一个href="http://developer.android.com/reference/android/app/Activity.html#onConfigurationChanged%28android.content.res.Configuration%29"相对=nofollow> onConfigurationChanged
并执行动画那里。
Then, override your activity's onConfigurationChanged
and perform the animation there.
这篇关于动画同时改变方向的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文