0

In my app I am showing a list of cards in a recycler view. The card view consists of two textviews and one imageview. Whenever the user clicks on the imageView of a cardview I need the position of the cardview. Any help would be appreciated.

  • Please add some code and what you tried. – ppasler Jan 29 '17 at 11:14
  • 1
    Possible duplicate of [How do I get the position selected in a RecyclerView?](https://stackoverflow.com/questions/26682277/how-do-i-get-the-position-selected-in-a-recyclerview) – Pouya Heydari Nov 20 '17 at 09:43

1 Answers1

0

You can set an OnClickListener for your ImageView inside your Adapter , from there you can get the position of current Item by using getAdapterPosition() method. also you can see :

Get position of clicked item in recycler view

How do I get the position selected in a RecyclerView?

Pouya Heydari
  • 2,496
  • 26
  • 39