terrakok / Cicerone

🚦 Cicerone is a lightweight library that makes the navigation in an Android app easy.
Other
2.58k stars 218 forks source link

Activity navigation without supporting Fragments #77

Closed amitav13 closed 5 years ago

amitav13 commented 6 years ago

Hi, As it stands, SupportAppNavigator forces support for both Activity and Fragments when implementing it. If I'm refraining from using fragments altogether, then it doesn't make as much sense for me to put in a containerId(which needs a primitive int value) and to override createFragment and pass back an arbitrary non-null Fragment.

While it is easy enough to override the Navigator interface and build my own Activity-only navigator, it would be nice if we could have one in the library ready to use, out-of-the-box. Could contribute this myself too. Thoughts?

terrakok commented 6 years ago

I think that Single-Activity application is right way. But if you need only activity navigator, you can do it easy himself 😉

amitav13 commented 5 years ago

I did end up writing this myself, for anyone interested: https://gist.github.com/amitav13/7f8d702cd42bf02efe994be36d5ee28f