简体   繁体   English

改变方向时的动画

[英]Animation when changing orientation

Is it possible to perform animation when changing orientation?改变方向时是否可以执行动画? I have two layout for portrait and landscape.我有纵向和横向两种布局。 I want to perform a custom animation when changing orientation.我想在更改方向时执行自定义动画。 If it's possible, how can I do that?如果可能,我该怎么做? In addition, when the screen change orientation, the children view rotate independently.另外,当屏幕改变方向时,子视图独立旋转。 For example, the textview rotates from left to right and the button rotate from right to left比如textview从左向右旋转,按钮从右向左旋转

I tried to use to rotate layout by using this sugesstion .我试图通过使用这个 sugesstion来旋转布局。 It's just simulation, and the orientation is seemed to have animation when changing.这只是模拟,方向在改变时似乎有动画。 As Jansel mentioned, there not way to change orientation change animation.正如 Jansel 所提到的,没有办法改变方向改变动画。 Thus, I just try to make something to everything look like that.因此,我只是试图让一切看起来像那样。

抱歉,没有办法改变方向改变动画,因为这种行为不是由您的应用程序处理的,而是由窗口管理器处理的,它会占用您的屏幕并重建您的视图。

Android开发者网站看到这可以为您提供一些帮助。

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

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