https://kotlinlang.org logo
Title
u

user

07/18/2022, 1:21 PM
Hilt - Android - Cannot inject members into int I have an interface like below: @EntryPoint @InstallIn (SingletonComponent::class) interface Listener { fun onQuestionClicked(id: Int) } In my Adapter class for RecyclerView I have used : // bind your view here binding.root.setOnClickListener { val myEntryPoint = EntryPointAccessors.fromApplication(context, Listener::class.java) myEntryPoint.onQuestionClicked(question.id) } In my Fragment Class : @AndroidEntryPoint class QuestionsFragment: Fragment, Listener{ override...