android 生命周期四代码

   @Override
    protectedvoid onResume() {
       super.onResume();
      System.out.println("onResume!!");
    }
   @Override
    protectedvoid onPause() {
       super.onPause();
       System.out.println("onPause!!");
    }
    
   @Override
    protectedvoid onStop() {
       super.onStop();
       System.out.println("onStop!!");
       finish();
       // The activity is no longer visible (it is now "stopped")
    }
   @Override
    protectedvoid onDestroy() {
       super.onDestroy();
       System.out.println("onDestroy!!");
       // The activity is about to be destroyed.
    }
   
原文地址:https://www.cnblogs.com/xiaowangba/p/6314324.html