简体   繁体   English

动画是否支持Android SDK 1.5?

[英]Animation support for Android SDK 1.5?

I'm trying to add some animations to my application. 我正在尝试向我的应用程序添加一些动画。 I've essentially got a few menu screens, that all eventually lead to the main application that is a surface view. 我基本上有几个菜单屏幕,最终所有这些菜单屏幕都指向主应用程序,即表面视图。 I want to add some nice animations between screen like fading in and out between screens. 我想在屏幕之间添加一些不错的动画,例如在屏幕之间淡入和淡出。 What's the easiest way to do this that is supported by SDK1.5 and above (I want to target most users)? SDK1.5及更高版本(我想针对大多数用户)支持的最简单方法是什么?

I'm confused by what is and isn't supported in SDK1.5. 我对SDK1.5中支持的功能感到困惑。 My belief at the moment is that animations between different activities is not supported in 1.5 but animations in things like ViewFlipper are. 目前,我的信念是1.5中不支持不同活动之间的动画,但支持ViewFlipper之类的动画。 It seems the easiest way is to set up a ViewFlipper, put each of my screens in that, set the animation settings and then use this to get nice transitions. 似乎最简单的方法是设置ViewFlipper,在其中放置每个屏幕,设置动画设置,然后使用它来获得良好的过渡效果。

Also, is there a way to override the "no animations" setting that can be found in the phone's main settings screen under display? 另外,是否有方法可以覆盖显示在手机主设置屏幕中的“无动画”设置? I'm making a game, so presentation is important, so I want to be sure that whatever I use will cause an animation regardless of this global setting. 我正在制作游戏,因此演示很重要,因此我想确保无论使用哪种全局设置,无论我使用什么内容都将产生动画。

My belief at the moment is that animations between different activities is not supported in 1.5 but animations in things like ViewFlipper are. 目前,我的信念是1.5中不支持不同活动之间的动画,但支持ViewFlipper之类的动画。

Correct. 正确。

It seems the easiest way is to set up a ViewFlipper, put each of my screens in that, set the animation settings and then use this to get nice transitions. 似乎最简单的方法是设置ViewFlipper,在其中放置每个屏幕,设置动画设置,然后使用它来获得良好的过渡效果。

Either that or just directly apply AlphaAnimation and kin to your Views . 要么直接将AlphaAnimation和kin应用于您的Views

is there a way to override the "no animations" setting that can be found in the phone's main settings screen under display? 有没有一种方法可以覆盖显示在手机主设置屏幕中的“无动画”设置?

No, but bear in mind that is only for inter-activity animations. 不可以,但是请记住,这仅适用于交互动画。

I'm making a game, so presentation is important, so I want to be sure that whatever I use will cause an animation regardless of this global setting. 我正在制作游戏,因此演示很重要,因此我想确保无论使用哪种全局设置,无论我使用什么内容都将产生动画。

Then do not rely upon global settings. 然后不要依赖全局设置。 Which, in this case, means do not rely upon inter-activity animations. 在这种情况下,这意味着不依赖交互动画。

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

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