Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what is called before onCreate in android [duplicate]

Tags:

android

Possible Duplicate:
Android Activity Life Cycle - difference between onPause() and OnStop()

What is called before onCreate in android? So that when I click a tab, I can show a loading screen or some functionality before I actually render my next screen.

like image 583
max Avatar asked Aug 30 '11 11:08

max


People also ask

Is onResume called after onCreate?

After the onCreate() method finishes execution, the activity enters the Started state, and the system calls the onStart() and onResume() methods in quick succession.

Is onAttach called before onCreate?

onAttach() is always called before any Lifecycle state changes. The onDetach() callback is invoked when the fragment has been removed from a FragmentManager and is detached from its host activity.

Why is onCreate called twice?

onCreate will get called when your activity has been destroyed and recreated, which happens any time the device is rotated, the keyboard is opened, or you switch apps and the system decides it's time to reclaim some memory and kill off your app.

Is onCreate called only once?

OnCreate is only called once.


1 Answers

onCreate is the first method to be called from activity ...You can show ur loading screen be setting the proper view in your oncreate method.....

check this:

http://developer.android.com/reference/android/app/Activity.html

like image 72
Vineet Shukla Avatar answered Oct 05 '22 12:10

Vineet Shukla