finish () does not terminate in Activity

Well sites, and books relating to the Android
[Finish () to terminate in the Activity]
But I have written,
The misunderstanding seems to have been a little sensitive
I hooked (=_=;) wreck

finish () is
Immediately terminate] [Activity
But I thought,
This is apparently not in others.

They developed a certain application
Activity in some circumstances do not want to end the finish () I was using.

Like this ↓

---
Pretreatment;
if (expression) finish ();
Disposition;
---

Then, somehow finish () is not working like
Falls in parts of the post-processing error.

As a test,
---
Log.d ("CHECK", "before finish ()");
finish ();
Log.d ("CHECK", "after finish ()");
---
Why do not you look at a LogCat
---
09-19 23:29:37.263: DEBUG / CHECK (13016): before finish ()
09-19 23:29:37.273: DEBUG / CHECK (13016): after finish ()
---
Through the good and away
"[After finish ()] is not about you! ヾ (` Д ‘*) Bruno ”
I like to be alone with Boketsukkomi

, And so could not solve alone
I wished everyone a wise man for advice
[Finish () will not terminate immediately Activity] is not
I found that.

finish () is apparently
“Can I quit you”
Is only a declaration, not be terminated immediately on the spot
At any time of the Android OS seems to be terminated.

In other words, it appears to be an immediate exit from a human Why
Karashitara Android, an OS that had declared the end Activity
It seems when you have finished noticed.

There are a few people know there is a time lag
In the meantime, so the program progresses,
It seems there would have been killed and post-processing part of the error.

finish () is followed, it is better to put that extra processing.

So, the earlier program

Pretreatment;
if (! expression) post-treatment;
finish ();

Can be solved.

Hmm, but no,

Pretreatment;
if (expression) finish ();
Disposition;

We would want to sometimes.

When such Sundaro do?

Androidアプリ講座オープン
副業大学にAndroidアプリ作成講座がオープン。
アフィリエイトやドロップシッピングも学べるお得な大学。

innc.japan-power.biz
カテゴリー: Android アプリ 関連 情報   パーマリンク