After login, prevent the application from returning to the login screen with the back button [duplicate]

0

In my login system, I type the data and have 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?

    
asked by anonymous 16.08.2016 / 03:16

1 answer

1

You can put finish (); after attempting to close the current activity when moving to new.

I hope I have helped.

    
16.08.2016 / 04:04