开发者

problem with finishing/exiting an activity in android app

开发者 https://www.devze.com 2023-04-08 16:28 出处:网络
I am trying to exit开发者_如何转开发 an activity using the code myClass.this.finish(); However, the code keeps on executing the lines after this.

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 ?


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号