DEV Community

Discussion on: Don’t write Android apps like it’s 2009!

Collapse
 
mgazar_ profile image
Mostafa Gazar

Back in the day you could find in an Android application codebase a ton of Activity wrappers that are basically doing nothing other than holding fragments. To avoid creating a ton of activities some people would use a generic SingleFragmentActivity.

With something like the Navigation Jetpack library and NavHostFragment you can support the typical forward path of your application + back and up handling + deep linking and deep linking back stack.

To learn more about why Single Activity makes sense, check out this great talk by Ian Lake