Different States of an Android Activity

+126 Bucky Roberts · December 19, 2014
/images/forum/upload/2014-12-19/5a00eeefae97a8d127f621fdc5ad2ff7.png


   @Override
   protected void onStart() {
       super.onStart();
       Log.i(TAG, "onStart");
   }


   @Override
   protected void onResume() {
       super.onResume();
       Log.i(TAG, "onResume");
   }


   @Override
   protected void onPause() {
       super.onPause();
       Log.i(TAG, "onPause");
   }


   @Override
   protected void onStop() {
       super.onStop();
       Log.i(TAG, "onStop");
   }


   @Override
   protected void onRestart() {
       super.onRestart();
       Log.i(TAG, "onRestart");
   }


   @Override
   protected void onDestroy() {
       super.onDestroy();
       Log.i(TAG, "onDestroy");
   }


   @Override
   protected void onSaveInstanceState(Bundle outState) {
       super.onSaveInstanceState(outState);
       Log.i(TAG, "onSaveInstanceState");
   }


   @Override
   protected void onRestoreInstanceState(Bundle savedInstanceState) {
       super.onRestoreInstanceState(savedInstanceState);
       Log.i(TAG, "onRestoreInstanceState");
   }

Post a Reply

Replies

- page 3
Oldest  Newest  Rating
0 Waqar Ahmad · August 23, 2015
Bucky bro checkout Tag error. Reply soon
0 Waqar Ahmad · August 23, 2015
Check this "Tag" error plz
0 Lester Rodriguez · August 29, 2015
Man,
You're awesome!
Pretty sweet.
Just having fun with your tutorials
and learning as well.
0 Akshay Pimpalkar · February 3, 2016
i found these question marks on ur code. What does it mean?/images/forum/upload/2016-02-03/0ece4ed455921192ec6688b6269e2896.png 
0 Sharad Gupta · February 22, 2015
Thanks for the Source Code. Just began watching tutorials. They are awesome :) !!
0 android learner · June 29, 2015
I'm getting error: class, interface or enum expected. What to do?
0 jinu mm · July 7, 2015
Thanks for the Source Code. Just began watching tutorials for   http://www.essayscampus.com  essay writing  
students
0 Lasith Niroshan · April 9, 2015
Thanks for codings...:)
0 Shakun Bhalla · July 23, 2015
Hi,
I also copied the code that you wrote above but the problem that i am facing is that it shows an error in the "TAG", it says that it has a private access in android.support.v4.app.FragmentActivity.

Kindly help me that as i am stuck with this and am not able to proceed further.

Thank you
0 Daniyar Iman-Zhussip · March 18, 2016
nice man

Java / Android Development

107,090 followers
About

Very popular language used to create desktop applications, website applets, and Android apps.

Links
Moderators
Bucky Roberts Administrator