I need to navigate from my Login activity to my Home activity and I know this is discouraged but this is what I need to do for a project. The thing is, all the examples I see work with fragments. So how can I do that when person clicks on a button?
I added this to my login activity but I can't really link it in my nav graph:
binding.btnLogin.setOnClickListener {
Navigation.findNavController(it).navigate(R.id.homeActivity)
}
I also need the app to close instead of go back to the previous activity which would be the login once I am at home ... any advice would be very helpful since this is my first time working with navigation.