Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

Ronquilo B.

Venancio
BSIT-701E
03 Hands-on-Activity 1

OUTPUT:

INPUT:

CODE:

package com.mycompany.myapp;

import
android.app
.*; import
android.os.
*; import
android.wid
get.*;
import
android.con
tent.*;

public class MainActivity extends Activity


{

@Override

protected void onCreate(Bundle savedInstanceState)

super.onCreate(savedInstanceState);

setContentView(R.layout.main);

Toast.makeText(getApplicationContext(),"Created!",
Toast.LENGTH_SHORT).show();

@Override

protected void onStart()

//TODO: Implement this method


super.onStart();

Toast.makeText(getApplicationContext(), "Started!",
Toast.LENGTH_SHORT).show();

@Override

protected void onResume()

//TODO: Implement this method

super.onResume();
Toast.makeText(getApplicationContext(), "Resume!",
Toast.LENGTH_SHORT).show();

@Override

protected void onPause()

//TODO: Implement this method


super.onPause();
Toast.makeText(getApplicationContext(), "Paused!" ,
Toast.LENGTH_SHORT).show();

}
@Override
protected void onStop()
{
//TODO: Implement this method super.onStop();
Toast.makeText(getApplicationContext(), "Stopped!",
Toast.LENGTH_SHORT).show();
}
@Override
protected void onRestart()
{
//TODO: Implement this method super.onRestart();
Toast.makeText(getApplicationContext(), "Restarted!",
Toast.LENGTH_SHORT).show();
}
@Override
protected void onDestroy()
{
//TODO: Implement this method super.onDestroy();
Toast.makeText(getApplicationContext(), "Destroyed!",
Toast.LENGTH_SHORT).show();
}
}

You might also like