I am learning Kotlin, and trying to set up Navigation in my app.
I am unable to find/trigger the auto generated code in Android Studio. Based on the navigation tutorial, I need to reference it to trigger an action on demand. It's my understanding HomeFragmentDirections is an auto-gen class.
view.findViewById<Button>(R.id.navigate_action_button)?.setOnClickListener {
val flowStepNumberArg = 1
val action = HomeFragmentDirections.nextAction(flowStepNumberArg)
findNavController().navigate(action)
}
I have been following this.
Navigation directions get auto-generated only after a successful build. You should either go to Build
-> Make Project