Monday, June 10, 2013

[Android] Clearing previous activities and opening a new one

So maybe you want to close the Welcome Screen as well as the Login Screen when you get to the screen after a successful login. Here are the flags to pass:

Intent.FLAG_ACTIVITY_CLEAR_TASK|Intent.FLAG_ACTIVITY_NEW_TASK

If you look around, people may suggest 

Intent.FLAG_ACTIVITY_CLEAR_TOP
but this didn't do the job.

No comments:

Post a Comment