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...