Advertisement
Guest User

Untitled

a guest
Dec 7th, 2016
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. # Introduction
  2.  
  3.  
  4. ## Activity
  5.  
  6. Activity life cycle normally
  7.  
  8. ```
  9. onCreate ->
  10. onStart ->
  11. onResume -> ...
  12. ```
  13.  
  14. After we roate the device screen, the life cycle will continue as below...
  15.  
  16. ```
  17. onSaveInstanceState –>
  18. onPause –>
  19. onStop –>
  20. onDestroy –>
  21. onCreate –>
  22. onStart –>
  23. onRestoreInstanceState –>
  24. onResume –> ...
  25. ```
  26.  
  27. Then we rotate again...
  28.  
  29. ```
  30. onSaveInstanceState –>
  31. onPause –>
  32. onStop –>
  33. onDestroy –>
  34. onCreate –>
  35. onStart –>
  36. onRestoreInstanceState –>
  37. onResume –>
  38. onSaveInstanceState –>
  39. onPause –>
  40. onStop –>
  41. onDestroy –>
  42. onCreate –>
  43. onStart –>
  44. onRestoreInstanceState –>
  45. onResume –>
  46. ```
  47.  
  48. ## Fragment
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement