so I'm using the navigation component and something I'm trying to do right now is implement a listener for when the user clicks a button in a dialog. In another fragment, I want to detect when that happens.
In the past, I would just create an interface within the dialog and call the interface's function in the button's onClick. Then in the fragment, I'd set the listener by having a variable for the dialog and calling the set function, with the interface function implemented in the fragment. So like:
dialogFrag.setListener(this)
But with navigation component, I'm not sure how to do this since I've been handling navigation like:
findNavController().navigate(R.id.dialogName)
Any idea how to do this?