After logging in, prevent the app from returning to the login screen with the back button

Asked

Viewed 328 times

0

In my login system, I type in the data and make it open a new Activity if the data is right.

So far so good. But when I click back (the idea would be to close the application), it simply shows the login screen. How to destroy the login screen, the moment I log in and open a new screen?

1 answer

1

You can put Finish(); after the Intent so that it closes the current Activity when passing to new.

I hope I’ve helped.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.