This is a sort of follow-up or complement to this post. I am trying to get the position of an item in my RecyclerView, but none of the methods I have tried have worked.
Call getAdapterPosition() in your onClick() method because then at the time of the click you want to know the position of the item. If you check at the time of the creation it will (most of the times) be inaccurate.