DEV Community

Shoaib Ahmed
Shoaib Ahmed

Posted on

Activity and Fragment Lifecycle - Android

Activities are one of the most crucial app components in #Android #Development. They serve as the basic entry points into our app and contains our user interface.

Activities have their own life-cycle, which is a set of callbacks initiated at a particular activity state.

To know them better, I have made a repository which helps to understand the flow of these life-cycle callbacks. I have placed block comments over each callback function explaining their initiating state/condition and what sort of code should be placed in them. This also covers the life-cycle of fragments as well.

Just clone, run, perform flows and observe your callback in the logcat. Don't forget to star it is you like it.

NOTE: #Jetpack #Compose version coming soon...
LINK: https://github.com/Shobu95/Lifecycle-ActivitiesAndFragments

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay