This Android app, ActivityFragmentLifecycleApp, is designed to help you understand the lifecycle of activities and fragments. It includes all possible navigation operations and their impact on the lifecycle events of activities and fragments. These event's logs can be seen in Android Studio LogCat.
- Add Fragment One: Adds Fragment One to the screen.
- Add Fragment One with Backstack: Adds Fragment One to the screen with back stack management.
- Add Fragment Two: Adds Fragment Two to the screen.
- Add Fragment Two with Backstack: Adds Fragment Two to the screen with back stack management.
- Replace Fragment Three: Replaces the current fragment with Fragment Three.
- Replace Fragment Three with Backstack: Replaces the current fragment with Fragment Three and adds it to the back stack.
- Replace Fragment Four: Replaces the current fragment with Fragment Four.
- Replace Fragment Four with Backstack: Replaces the current fragment with Fragment Four and adds it to the back stack.
- Open Blank Activity: Opens a blank activity in a new window.
-
Clone the repository to your local machine:
git clone https://github.com/SachanKapil/ActivityFragmentLifecycleApp.git
-
Open the project in Android Studio.
-
Run the app on an emulator or physical device.
-
Explore the app and interact with the buttons to observe the lifecycle events of activities and fragments during navigation operations.
To monitor the lifecycle events in Logcat with the "ActivityFragmentLifecycleApp" tag:
-
Open Logcat in Android Studio.
-
Enter "ActivityFragmentLifecycleApp" in the search bar or filter.
-
Interact with the buttons in the app to trigger navigation operations and observe the corresponding lifecycle events logged with the "ActivityFragmentLifecycleApp" tag.