Skip to content

Instantly share code, notes, and snippets.

@jtmuller5
Last active February 22, 2020 00:15
Show Gist options
  • Save jtmuller5/b70348a01c56483d99f0c62d7494bd1e to your computer and use it in GitHub Desktop.
Save jtmuller5/b70348a01c56483d99f0c62d7494bd1e to your computer and use it in GitHub Desktop.
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
view.findViewById<View>(R.id.button_home).setOnClickListener {
val extras = FragmentNavigatorExtras(
textView to "exampleText"
)
val action = HomeFragmentDirections.actionHomeFragmentToHomeSecondFragment("From HomeFragment")
NavHostFragment.findNavController(this@HomeFragment).navigate(action,extras)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment