开发者

Prevent default animation (Right to Left)

I wanna disable the automatic slide in from right to left an开发者_运维百科imation/transition. All new intents/activities in my app are supposed to have no animation.

How can this be achieved?


You can disable the windowAnimations from code through calling:

getWindow().setWindowAnimations(0);

in every activity that you want to disable the animations in.

This looks a bit hacky because it will set the animation to some resource id that i hope does not exist and then you are relying on the system no to crash. It works fine in one of my applications but it is not documented that it always will and should work this way. So try it and do your own tests and be aware of this.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜