I am using a listview having imageviews and textviews. When one of the image views is clicked, I should get the position of a particular listitem.
I know I can get the listitem position on setting clicklistener on a listview, but the image has a view holder item in it, so it’s not getting the perfect value, only -1 every time.

Without using getview
So I have tried rightimg.setOnClickListener, but it is not possible to get the position from that.
How can I solve this problem?
Try implementing it like: