开发者

Is there a flip animation available to use when transitioning between activities?

开发者 https://www.devze.com 2023-02-26 12:31 出处:网络
When transitioning between activities, such as calling startActivity(); or when using the back button, the screen slides in from the sides.

When transitioning between activities, such as calling startActivity(); or when using the back button, the screen slides in from the sides.

Is there any way to alter this? I have a flash-card like application, so when I move from activity A to activity B I would like the screen to flip over like turning a real flash card.

Is there any way to do this out 开发者_开发知识库of the box? Or does this require some custom animations?


Since Android 2.0 (API Level 5), you can use Activity.overridePendingTransition specify an explicit transition animation .

see http://developer.android.com/reference/android/app/Activity.html#overridePendingTransition(int, int)


As far as I know, the applications have no control over the transitions between their activities.

What you could do is merge the two activities using a custom ViewGroup that changes between the two Views using any animation you like. It's not trivial but should certainly be doable.

0

精彩评论

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