Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.example.cyklzyciaaplikacji;
- import androidx.appcompat.app.AppCompatActivity;
- import android.os.Bundle;
- import android.util.Log;
- import android.widget.Button;
- import android.widget.Toast;
- public class MainActivity extends AppCompatActivity {
- Button button;
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.activity_main);
- Toast.makeText(getApplicationContext(),"Jestem w onCreate",Toast.LENGTH_LONG).show();
- Log.i("LOG1","======= Teraz jest onCreate");
- }
- @Override
- protected void onResume() {
- super.onResume();
- Toast.makeText(getApplicationContext(),"Jestem w onResume",Toast.LENGTH_LONG).show();
- }
- @Override
- protected void onStart() {
- super.onStart();
- Toast.makeText(getApplicationContext(),"Jestem w onStart",Toast.LENGTH_LONG).show();
- }
- @Override
- protected void onRestart() {
- super.onRestart();
- Toast.makeText(getApplicationContext(),"Jestem w onRestart",Toast.LENGTH_LONG).show();
- }
- @Override
- protected void onPause() {
- super.onPause();
- Toast.makeText(getApplicationContext(),"Jestem w onPause",Toast.LENGTH_LONG).show();
- }
- @Override
- protected void onStop() {
- super.onStop();
- Toast.makeText(getApplicationContext(),"Jestem w onStop",Toast.LENGTH_LONG).show();
- }
- @Override
- protected void onDestroy() {
- super.onDestroy();
- Toast.makeText(getApplicationContext(),"Jestem w onDestroy",Toast.LENGTH_LONG).show();
- }
- }
Add Comment
Please, Sign In to add comment