Android/Java ดู Activity Lifecycle

ดูเมธอดต่างๆของ Android Activity Lifecycle ด้วยการ log ออกมาดู

MethodDescription
onCreatecalled when activity is first created.
onStartcalled when activity is becoming visible to the user.
onResumecalled when activity will start interacting with the user.
onPausecalled when activity is not visible to the user.
onStopcalled when activity is no longer visible to the user.
onRestartcalled after your activity is stopped, prior to start.
onDestroy called before the activity is destroyed.  

ไฟล์ที่เกี่ยวข้อง

  • MainActivity.java
Continue reading