How to Navigate any destination for action of header of drawer in navigation architecture
问题 Anyone please explain, How to define the action in Navigation architecture for header layout of drawer. Now, I need to set click of header of drawer and I set it to like this: headerOfNavDrawer.setOnClickListener{ //Here I want to navigate to editProfileFragment //But For navigation I need an action in nav arch graph. //Where to put action?? } 回答1: You have two things you need: A reference to the NavController . As per the Navigate to a destination documentation, you can use findNavController