How to switch between actions using viewflipper

In my Android application, I use two actions, and I want to make a smooth transition between these actions. I saw a lot of reference guides about how ViewFlipper can make a smooth transition between views in one action. So I would like to know if I can use ViewFlipper to switch between actions or is there any other way to do this. Currently, I just use buttons that will trigger activity, but the switch doesn't look very good.

I would be grateful for any suggestions.

Thanks,

Baluk

+6
android android-activity switch-statement viewflipper
source share
2 answers

ViewFlipper can only handle views, not actions. If there is a way to wrap an action in a view, then you can emulate it, but I'm afraid that the navigation stack will be confused.

+3
source share

What you really want to do is set a custom or just another type of animation when the Activity is called or ends.

The answer is yes. You can do this using the overridePendingTransition () method immediately after calling one of the flavors startActivity() or the finish() method.

+3
source share

All Articles