Skip to content

Migrate to Navigation 3#17

Draft
elevenfive wants to merge 2 commits into
mainfrom
pre-2.1.0
Draft

Migrate to Navigation 3#17
elevenfive wants to merge 2 commits into
mainfrom
pre-2.1.0

Conversation

@elevenfive

@elevenfive elevenfive commented Apr 6, 2026

Copy link
Copy Markdown
Member

Summary

  • Migrate from Fragments to pure Compose with Navigation 3: Replace Fragment-based navigation with NavDisplay and type-safe NavKey routes. Remove all Fragment classes, nav graph XML, ViewBinding, and fragment dependencies
  • Update ViewModels to emit NavigationAction enum instead of R.id.* resource IDs

Test plan

  • Verify app navigation: Landing → Disclaimer → Clock flow
  • Verify app navigation: Landing → Clock (returning user)
  • Verify exact alarm permission intercept works
  • Verify font license and donation dialogs open and auto-dismiss
  • Verify TV disclaimer variant renders correctly
  • Run ./gradlew test for unit tests
  • Run instrumented tests on device/emulator

@elevenfive elevenfive changed the title Migrate to Navigation 3 + fix widget release builds Migrate to Navigation 3 Apr 6, 2026
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant