Feb 3, 2022
You don't have to deal with lifecycle like that anymore. We have databinding, extension functions, coroutines, flow / livedata.
Fragments and navigation component can also make your app architecture similar to micro frontends.
If you follow MVVM architecture and use databinding, then you can write fully reactive and functional apps, similar to web dev.
To show a small example here's a rewrite of all your code using Flow:
https://gist.github.com/TorkelV/455fa0002c8fbb424f5fe8efe5c15246