Which lifecycle method is called when an Android activity is first created?
Correct answer
D. onCreate()
16 views
D. onCreate()
16 views
onCreate() runs once when the activity is created, so it is where the layout is set and views are initialised. onStart() and onResume() follow as the activity becomes visible and interactive.
Asked in: NTS, PPSC, Android Interviews
Not sure why the answer is D? Ask here and get an explanation.