Issue
I make easy app for test functions like onCreate(), onStart, etc. Each function make you own log. And start test.
- a) When app is started - onCreate, then onStart and onResume.
- b) When press collapse all window button - onPause and onStop.
- c) When select app from list - onRestart, then onStart and onResume.
- d) When press Back button - onPause, onStop and onDestroy.
Here's my questions:
- Why onResume method is called when I execute my app? (in a)
- Why onPause and onStop methods are called together? (in b)
- Why in C called three methods instead onRestart, or onResume? (in c)
- Why onDestroy method is called? (in d)
P.S.: Sorry for english :)
Solution
Here is the Android lifecycle:
You can see the answers to your questions by following the chart.
Answered By - David S.
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.