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.
After the onCreate() method finishes execution, the activity enters the Started state, and the system calls the onStart() and onResume() methods in quick succession.
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.
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.
OnCreate is only called once.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With