This repository provides examples in Java for understanding the Android Activity Lifecycle from onStart until onDestroy.
Understanding the Android Activity Lifecycle is crucial for Android developers as it governs how activities behave throughout their lifetime. This repository aims to provide clear examples to help Politeknik Seberang Perai JTMK students grasp the concepts effectively.
- Detailed examples for each stage of the Android Activity Lifecycle.
- Clear explanations and annotations to aid understanding.
- Java language used for implementation.
- onCreate: Initializes the activity.
- onStart: Called when the activity becomes visible to the user.
- onResume: Called when the activity starts interacting with the user.
- onPause: Called when the activity is going into the background, but still visible.
- onStop: Called when the activity is no longer visible to the user.
- onDestroy: Called before the activity is destroyed.
- Clone the repository:
git clone https://github.com/fare4z/AndroidActivityLifecycle.git
- Open the project in Android Studio.
- Navigate to the desired example to understand the corresponding lifecycle method.
- Run the examples on an Android emulator or device.
