有人可以提供一个Activity调用其finish()方法时会发生什么的描述吗?
它会立即退出,还是完成调用它的函数?
I tried the following code
Log.d("t20", "First here");
startActivity(new Intent(this, AnotherActivity.class));
finish();
Log.d("t20", "Then Here");
Run Code Online (Sandbox Code Playgroud)
log output:
First here
Then Here
Run Code Online (Sandbox Code Playgroud)
Why the second log message is printed?
The execution should be stopped at finsh(), right?