niccosuave
niccosuave

Reputation: 43

How would I finish activity 'B' and go back to activity 'A'?

I have a startup screen with an app I'm working on and when you click the "existing user" button it opens a page to input a username and password. When that is done the user will click "OK" and then the "Processing. May take a few moments." screen pops up with a button to abort which should bring it back to the user info input screen. I just don't know how to get the "Abort" button to work correctly, as I am new to the whole programming thing. Any help would be appreciated.

Upvotes: 0

Views: 80

Answers (1)

kosa
kosa

Reputation: 66657

Have you tried finish()? Just call finish(); inside activity B where you want to finish, that takes you to previous activity (assuming that is A).

See this tutorial for an example.

Upvotes: 3

Related Questions