Alex Rivera | Logout

New Activity in Android "enter from the side"

Asked 2011-01-26T16:34:52.647
37

What's the best way to go to a new activity but make it look like the activity slides to the left and the new activity enters the screen? I am using intents to call the new activity, is that the way to do it if I want the application to be lightweight?

To explain a bit better: on my Android phone I can swipe the view with the home meny to the right and then enters a friend stream from the left and takes place on the screen. I want to do it in my app with buttonclicks, it's the "sliding" i am after. THanks!

Edit
Report

1 Answer

3

Jems is correct. By default, you will get a sliding animation when launching a new intent.

If you are looking for a more custom animation, you can use overridePendingTransition. Keep in mind it was added in API Level 5. See this API demo for sample usage.

answered 2011-01-26T17:25:41.710

Your Answer