Google recommends that you use fragments to build a flexible UI. In cases when we need to optimize the UI for tablets or implement ViewPager this is indeed the easiest way.
Anyway, using fragments isn’t that easy. Anyone who’ve ever seen a diagram of their life cycle, understands the statement well :wink: Potential memory leaks, a complex API, and bugs (the number of questions on StackOverflow more than 100 000). And this doesn’t look as a brilliant idea anymore.
But what are the alternatives?
Video: https://www.youtube.com/watch?v=LidlAkrYKGg
Demo: https://github.com/johnkil/android-without-fragments
=====================================
Links:
https://github.com/weefbellington/screenplay
https://github.com/nhaarman/Triad
https://github.com/doridori/Pilot
https://github.com/mattlogan/Pancakes
https://github.com/lyft/scoop
https://github.com/bluelinelabs/Conductor
https://github.com/sockeqwe/mosby-conductor
https://www.reddit.com/r/androiddev/comments/2iodnx/advocating_against_android_fragments/
https://medium.com/square-corner-blog/advocating-against-android-fragments-81fd0b462c97
https://eng.lyft.com/building-single-activity-apps-using-scoop-763d4271b41
https://speakerdeck.com/rock3r/life-without-fragments-with-eugenio-marletti
https://softwaremill.com/finally-getting-rid-of-android-fragments/
https://www.polidea.com/blog/Introduction_To_Single_Activity_Applications/
https://github.com/xxv/android-lifecycle