Bruno_
02/21/2020, 2:41 PMholder.rootView.setOnClickListener {
it.findNavController().navigate(R.id.numberDetailsScreen, bundleOf("numberName" to item.name))
}
the thing is that (from what I know) convention tells you to create Navigator interface
but doing so would require passing the event up somehow
so I could call this
interface NumbersListNavigator {
fun openNumberDetailsActivity(numberName: String)
}
Larissa Maraes
02/21/2020, 2:45 PMRaul Tunduc
02/21/2020, 2:46 PMBruno_
02/21/2020, 2:46 PMBruno_
02/21/2020, 2:46 PMclass NumbersListAdapter(
val onItemClickCallback: KFunction1<@ParameterName(name = "numberName") String, Unit>
)
Larissa Maraes
02/21/2020, 2:47 PMBruno_
02/21/2020, 2:47 PMBruno_
02/21/2020, 2:47 PMRaul Tunduc
02/21/2020, 3:10 PM