navigator

build

Looking for Jetpack Compose implementation of navigator, see here.

A small (Kotlin first) navigation library for Android to ease the use of fragment transactions with a navigator.navigateTo
call (rest is handled for you) & navigating back is as simple as navigator.goBack().

You also get a separate onBackPressed() callback on the child fragments which will be called when this is the current visible fragment & is the one which is going to be removed upon back press.

The library provides some custom transitions like CircularTransform (on top of existing animations), see its
use in the sample app here.

If you have any implementation details to cover let me know.

What additional benefits I can get when using this library?

  • Proper handling of Fragment Transaction.
  • Handling up & back press actions efficiently on Fragment.
  • Easy to use API for animations & transitions (see here).
  • Generic Typed Arguments when passing data between destinations (see here).
  • Quick Bottom & Tab navigation setup (see tutorials).

Implementation

  • The individual library versions can be found here.
// root's build.gradle
allprojects {
    repositories {
        mavenCentral()
    }
}
// modules's build.gradle
dependencies {
    // Check the above link for the individual library versions.
    implementation "io.github.kaustubhpatange:navigator:<version>" // Core library (Required)
    implementation "io.github.kaustubhpatange:navigator-extensions:<version>" // Optional but recommended
    implementation "io.github.kaustubhpatange:navigator-bottom-navigation:<version>" // For setting up Bottom Navigation.
    implementation "io.github.kaustubhpatange:navigator-tab-navigation:<version>" // For setting up Tab Layout Navigation.
    implementation "io.github.kaustubhpatange:navigator-rail-navigation:<version>" // For setting up Rail Navigation.
}
  • Snapshots

Snapshots of the current development version of navigator are available, which track the latest commit. See here for more information.

Samples

  • Basic sample - Hands on with the introduction to some library features.
  • Backpress sample - A sample focused on handling back press events effectively.
  • Navigation Sample - A sample which demonstrate the use of Bottom & Tab navigation supporting multiple backstack through navigator.
  • Running the samples

// Run the following command before building the project.

./gradlew navigator:publishReleasePublicationToMavenLocal

Tutorials

Apps using navigator

If you would like me to add your app in the list, let me know through issues.

Name
Moviesy - Client app for YTS movies
XClipper - Clipboard manager for Android & Windows

GitHub

https://github.com/KaustubhPatange/navigator