Skip to content

Hasitha-Su/Android-ActivityLifecycle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Android Activity Lifecycle Demo

A simple Android app that demonstrates the Activity lifecycle using two Activities and logging the different lifecycle events.

Activity is one of four main components of Android OS. An activity can be simply defined as a screen that user interact with. Every activity has a lifespan that includes methods like

  • onCreate()
  • onStart()
  • onResume()
  • onPause()
  • onStop()
  • onDestroy()

This repository is an example implementation of these activity life cyvcle methods.

Further information : https://developer.android.com/guide/components/activities/activity-lifecycle

Features

  • Two Activities (MainActivity and MainActivity2)
  • Demonstrates the lifecycle events of an Activity
  • Navigation between the two Activities using buttons

Installation

  1. Clone the repository to your local machine:

git clone https://github.com/your_username/activity_lifecycle_demo.git

  1. Open the project in Android Studio and build it.

  2. Run the app on an emulator or a physical device.

Usage

The app displays two Activities. By pressing the buttons, you can navigate between the Activities and observe the Activity lifecycle events in the logcat.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

MIT

About

Implementation of Android activity lifecycle methods

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages