Skip to content

Instantly share code, notes, and snippets.

@louis993546
Created November 10, 2018 07:15
Show Gist options
  • Save louis993546/585b53840dd6fa5666de7a82543c9430 to your computer and use it in GitHub Desktop.
Save louis993546/585b53840dd6fa5666de7a82543c9430 to your computer and use it in GitHub Desktop.
override fun navigate(transition: Transition) {
val actionId = when (transition) {
is Transition.WhatIsToEnter -> R.id.action_whatIsLoftFragment_to_enterLoftFragment
is Transition.EnterToCreation -> R.id.action_enterLoftFragment_to_creationFragment
is Transition.EnterToJoining -> R.id.action_enterLoftFragment_to_joiningFragment
is Transition.Joining2WaitForConfirmation ->
R.id.action_joiningFragment_to_waitForConfirmationFragment
}
findNavController(R.id.nav_host_fragment).navigate(actionId)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment