Created
July 1, 2020 16:31
-
-
Save cengiztoru/42bf3dac93e8a778e4f3dcc82b3ab245 to your computer and use it in GitHub Desktop.
Navigation Architectural Component
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lateinit var navController: NavController | |
override fun onViewCreated(view: View, savedInstanceState: Bundle?) { | |
super.onViewCreated(view, savedInstanceState) | |
navController = Navigation.findNavController(view) | |
btnSignup.setOnClickListener { | |
navController.navigate(R.id.action_loginFragment_to_signupFragment) | |
} | |
// view.findViewById<Button>(R.id.btnLogin).setOnClickListener{ | |
// navController.navigate(R.id.action_loginFragment_to_signupFragment) | |
// } | |
} | |
override fun onCreateView( | |
inflater: LayoutInflater, container: ViewGroup?, | |
savedInstanceState: Bundle? | |
): View? { | |
// Inflate the layout for this fragment | |
return inflater.inflate(R.layout.fragment_login, container, false) | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment