HomeBlogUsing onClickListener in Recycler View with Retrofit Structure in Android ?Problem and SolutionsUsing onClickListener in Recycler View with Retrofit Structure in Android ?By M.K. Verma · 4 May 2022I think the easiest way is passing function as parameter to RecyclerViewAdapter. for instance: RecyclerViewAdapter(val clickListener : () -> Unit) onCreateViewHolder(){ clickListener.invoke() } in your view adapter = ReceylerViewAdapter({ //do your stuff here })Share this:CommentsLeave a commentPost