Skip to content

Latest commit

 

History

History

navigation

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Navigation

Sub-sections:

My YouTube videos:

Official documentation

Latest Versions

When adding the required dependencies, it's highly recommended to check maven.google.com for the latest versions.

Java Code

Here is the equivalent Java code of the Kotlin code seen in this project:

Description Kotlin Java
Finding NavController in an Activity findNavController(R.id.nav_host_fragment) Navigation.findNavController(this, R.id.nav_host_fragment)
Finding NavController in a Fragment findNavController() NavHostFragment.findNavController(this)
Setting up the action bar setupActionBarWithNavController(navController) NavigationUI.setupActionBarWithNavController(this, navController)
Loading Fragment arguments private val args: PayPersonFragmentArgs by navArgs() PayPersonFragmentArgs args = PayPersonFragmentArgs.fromBundle(getArguments()); (in onViewCreated())