android / android/architecture-samples
Navigator/Router Class
- Dominant language
- Kotlin
- Stars
- 45.8k
- Forks
- 11.9k
- PR merge metrics
- No merged PRs in 30d
Description
Can't we refactor the Navigation responsibility from the presenters into separate class called Navigator that will be injected to the presenter.
So that we will have reusable navigation methods, like navigateToTasksActivity() can be called from many different presenters of the app.
Navigator might hold some navigation logic that is dependent on more variables (phone/tablet...etc).
if we have this Navigator/Router class, can we just call the navigation method from the View, or still we have to call the Presenter and then it calls the Navigator?
Contributor guide
Research direction
Start by tracing how presenters currently handle navigation and how the View calls them. Compare the proposed Navigator/Router responsibilities, including reusable methods such as navigateToTasksActivity() and phone/tablet-dependent logic. Done requires an agreed design for the injection and call flow; the issue names no files or tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, kotlin
- Domain
- mobile
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100