ahsan
ahsan

Reputation: 677

problem with finishing/exiting an activity in android app

I am trying to exit an activity using the code

myClass.this.finish();

However, the code keeps on executing the lines after this.

Any idea why ?

Upvotes: 1

Views: 157

Answers (1)

Alex Gitelman
Alex Gitelman

Reputation: 24722

This code just informs runtime that activity is finished so appropriate actions could be taken and activity is not preserved. But it does not mean immediate abort. Just put return where necessary.

Upvotes: 3

Related Questions