Skip to content

Question: How to get nextFragment when moving backward? #153

@FirstSpectr

Description

@FirstSpectr

I have an activity with toolbar, navigation drawer and container. So in navigator I did this:

override fun setupFragmentTransaction(nextFragment: Fragment) {
  when (nextFragment) {
    is SettingsFragment -> {
      binding.toolbar.setTitle(R.string.title_settings)
      binding.navigationView.setCheckedItem(R.id.nav_settings)
    }
  }
}

But this method not called when I call router.exit(). How can I figure out which screen will be shown?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions