https://kotlinlang.org logo
#android-architecture
Title
# android-architecture
p

Pratyush

03/13/2024, 12:51 PM
Hey, I have an app with around 45 screen for a type of user. Now there is a requirement to add a switcher that will completely change the screen/logic for the user. This will add another 30 screens. I cannot have two different apps. What would be the best way to handle this? The common entry point is the login screen
s

Stylianos Gakis

03/13/2024, 12:56 PM
Are those 30 screens actually different screens or just the same as before but with a different user?
p

Pratyush

03/13/2024, 1:00 PM
Completely different screens, different navigation logic. There is no coupling between different user screens To make it easier, think of it like this -> User A is using app as an admin of a movie theatre. User B is using it as director of NASA. But both have to use the same app
s

Stylianos Gakis

03/13/2024, 1:07 PM
So those two navigation graphs can be completely separate navgraphs, after login you go to the root of the right graph and from that point on it doesn’t really matter that the other one exists, you make those screens only let you navigate to the right destinations. Bonus points of those are not in the same module so that navigating to a “nasa” destination from an “admin” destination would just be impossible to do by accident if you can’t reference those destinations in the first place Would smth like that work for you here?
p

Pratyush

03/13/2024, 3:14 PM
That helps. Thanks @Stylianos Gakis
3 Views