Graitlion

Cykl aplikacji

Jul 2nd, 2022 (edited)
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.63 KB | None | 0 0
  1. package com.example.cyklzyciaaplikacji;
  2.  
  3. import androidx.appcompat.app.AppCompatActivity;
  4.  
  5. import android.os.Bundle;
  6. import android.util.Log;
  7. import android.widget.Button;
  8. import android.widget.Toast;
  9.  
  10. public class MainActivity extends AppCompatActivity {
  11.     Button button;
  12.  
  13.     @Override
  14.     protected void onCreate(Bundle savedInstanceState) {
  15.         super.onCreate(savedInstanceState);
  16.         setContentView(R.layout.activity_main);
  17.         Toast.makeText(getApplicationContext(),"Jestem w onCreate",Toast.LENGTH_LONG).show();
  18.         Log.i("LOG1","======= Teraz jest onCreate");
  19.     }
  20.     @Override
  21.     protected void onResume() {
  22.         super.onResume();
  23.  
  24.         Toast.makeText(getApplicationContext(),"Jestem w onResume",Toast.LENGTH_LONG).show();
  25.     }
  26.     @Override
  27.     protected void onStart() {
  28.         super.onStart();
  29.  
  30.         Toast.makeText(getApplicationContext(),"Jestem w onStart",Toast.LENGTH_LONG).show();
  31.     }
  32.     @Override
  33.     protected void onRestart() {
  34.         super.onRestart();
  35.         Toast.makeText(getApplicationContext(),"Jestem w onRestart",Toast.LENGTH_LONG).show();
  36.     }
  37.     @Override
  38.     protected void onPause() {
  39.         super.onPause();
  40.         Toast.makeText(getApplicationContext(),"Jestem w onPause",Toast.LENGTH_LONG).show();
  41.     }
  42.     @Override
  43.     protected void onStop() {
  44.         super.onStop();
  45.         Toast.makeText(getApplicationContext(),"Jestem w onStop",Toast.LENGTH_LONG).show();
  46.     }
  47.     @Override
  48.     protected void onDestroy() {
  49.         super.onDestroy();
  50.         Toast.makeText(getApplicationContext(),"Jestem w onDestroy",Toast.LENGTH_LONG).show();
  51.     }
  52. }
Add Comment
Please, Sign In to add comment