
Tool simplifies navigation with base functionality, Compose wrappers, and MVVM support. Features nodes, chains, and repositories for flexible navigation architecture.
Relatively simple tool for navigation in a lot of kotlin platforms:
It is strongly recommended to open tutorial after completing reading of this readme to understand how to use library
There are several types of artifacts:
Compose wrappers for navigation nodeViewsWhen using the core or MVVM AppCompatActivity.initNavigation extension on a plain Activity, call
dev.inmo.navigation.core.prepareNavigationRestore before super.onCreate on every creation:
override fun onCreate(savedInstanceState: Bundle?) {
prepareNavigationRestore()
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
initNavigation(/* your existing navigation configuration */)
}This preparation removes only restored NodeFragment instances before their lifecycle callbacks run;
navigation rebuilds and binds them from its configuration repository. Other Fragments and a custom
FragmentFactory keep their normal restoration behavior. NavigationMVVMSingleActivity already performs
the preparation, so its subclasses do not need an additional call.
Existing plain Activity hosts must add this preparation call. Calling initNavigation after
super.onCreate alone is too late to prepare restored Fragments. Accessing an unbound node or config
now throws an informative IllegalStateException immediately instead of waiting indefinitely.
implementation "dev.inmo:navigation.mvvm:$navigation_version"<dependency>
<groupId>dev.inmo</groupId>
<artifactId>navigation.mvvm</artifactId>
<version>${navigation_version}</version>
</dependency>Relatively simple tool for navigation in a lot of kotlin platforms:
It is strongly recommended to open tutorial after completing reading of this readme to understand how to use library
There are several types of artifacts:
Compose wrappers for navigation nodeViewsWhen using the core or MVVM AppCompatActivity.initNavigation extension on a plain Activity, call
dev.inmo.navigation.core.prepareNavigationRestore before super.onCreate on every creation:
override fun onCreate(savedInstanceState: Bundle?) {
prepareNavigationRestore()
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
initNavigation(/* your existing navigation configuration */)
}This preparation removes only restored NodeFragment instances before their lifecycle callbacks run;
navigation rebuilds and binds them from its configuration repository. Other Fragments and a custom
FragmentFactory keep their normal restoration behavior. NavigationMVVMSingleActivity already performs
the preparation, so its subclasses do not need an additional call.
Existing plain Activity hosts must add this preparation call. Calling initNavigation after
super.onCreate alone is too late to prepare restored Fragments. Accessing an unbound node or config
now throws an informative IllegalStateException immediately instead of waiting indefinitely.
implementation "dev.inmo:navigation.mvvm:$navigation_version"<dependency>
<groupId>dev.inmo</groupId>
<artifactId>navigation.mvvm</artifactId>
<version>${navigation_version}</version>
</dependency>