You should put a
The method that called
suppose you have a method xyz like below
xyz()
{
statment1
statement2
.
.
finish();
statement6
statement7
}
Then the finish() function will be called after statement7 is executed and the control has returned to android.
So , if you want your app to finish() immediately then put a return statement after finish(), Like below
xyz()
{
statment1
statement2
.
.
finish();
return;
statement6
statement7
}
Statement6 and statement7 will not be executed any more
return
statement after that finish
, because the method that called finish
will be executed completely otherwise.The method that called
finish()
will run to completion. The finish()
operation will not even begin until you return control to Android. suppose you have a method xyz like below
xyz()
{
statment1
statement2
.
.
finish();
statement6
statement7
}
Then the finish() function will be called after statement7 is executed and the control has returned to android.
So , if you want your app to finish() immediately then put a return statement after finish(), Like below
xyz()
{
statment1
statement2
.
.
finish();
return;
statement6
statement7
}
Statement6 and statement7 will not be executed any more
No comments:
Post a Comment