Migrate to Navigation 3#17
Draft
elevenfive wants to merge 2 commits into
Draft
Conversation
Replace Fragment-based navigation (Navigation Component 2.x) with Navigation 3's NavDisplay and type-safe routes. All UI was already Compose — this removes the Fragment/ViewBinding wrapper layer. - Add navigation3-runtime, navigation3-ui, lifecycle-viewmodel-navigation3, hilt-navigation-compose, and kotlinx-serialization-core dependencies - Define NavKey route objects for all 6 destinations - Rewrite Activity to use setContent with NavDisplay instead of FragmentContainerView + NavHostFragment - Move broadcast receiver registration to DisposableEffect in ClockScreen - Replace R.id.* navigation signals with NavigationAction enum in ViewModels - Remove all Fragment classes, nav_graph.xml, activity_content.xml - Remove fragment-ktx, legacy-support-v4, lifecycle-livedata-ktx, navigation-fragment-ktx, navigation-ui-ktx dependencies - Disable viewBinding build feature - Update all unit and functional tests
ViewModel.onCleared() is defined as empty, so calling super is unnecessary and triggers the EmptySuperCall lint error.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
NavDisplayand type-safeNavKeyroutes. Remove all Fragment classes, nav graph XML, ViewBinding, and fragment dependenciesNavigationActionenum instead ofR.id.*resource IDsTest plan
./gradlew testfor unit tests