Fabian
Fabian

Reputation: 3

How to end the app from an activity with the back pressed and not return to the previous activity

I have a problem that has me stuck, I have a webview that shows a page, what I am doing is that before I load the webview it shows me a splashscreen, the problem I have is that when I give the back pressed instead of closing the app, it returns me to the splashscreen and I don't want that, I want the whole app to close when I press backpressed and not return to a previous activity

Upvotes: 0

Views: 56

Answers (1)

Rediska
Rediska

Reputation: 1470

Put finish() immediately after startActivity(intent).

Upvotes: 2

Related Questions