Guia Navigation
Github
  • Overview
  • Setup
  • Using Guia
    • 📔Express Lore
      • Quick Start
    • 📖The Lore
      • Navigation Key
      • Navigation Node
        • Screen
        • Bottom Sheet
        • Dialog
      • Navigator
        • Navigation Operations
        • Navigator Instance
        • Back Handling
      • Navigator Config
        • Dynamic Navigation Node
        • Transitions
      • Containers
      • NavHost
        • Back Handling
      • Multi module navigation
        • NavHost Multi module
      • Deep Linking / Global Navigation
      • Results
      • Lifecycle, ViewModel, Saved State
      • UI Tests
  • 🤖Advanced
    • Custom LifecycleManager
Powered by GitBook
On this page
  • Back to Default Stack
  • Stack History
  • Create your own
  1. Using Guia
  2. The Lore
  3. NavHost

Back Handling

Guia provides common use cases for back handling for bottom tab navigation.

Back to Default Stack

navHost.DefaultStackBackHandler(HomeStackKey)

Now whenever we are on a tab that isn't HomeStackKey and we click back, the tab will be changed to that key.

Stack History

navHost.StackHistoryBackHandler()

Now whenever we call setActive , that handler will remember the sequence of tabs being active and goes back to those tabs as we click back.

Create your own

None of the back handlers mentioned above using anything internal to the library. They simply check the state of NavHost.currentEntry and the navigators' backstacks and react to it to form a back handling strategy. So you're free to create your own back strategy.

PreviousNavHostNextMulti module navigation

Last updated 2 years ago

📖