i am trying to add some animations to my Recyclerview. So far everything works great, but i have reached on problem i don't have an answer to. I have a List where the user should be able to select only one Item. When an item is selected an animation starts and a checked box appears. Now if another item is selected it should also play this animation (This Part works) but it should also remove the checkbox from previous selected one with an animation (This part does not work).
My Problem is that i do not have a clue how to get the adapterPosition of the previous selected item.
I am thankful for any help
So i solved it, maybe someday someone will stumble upon this question, so here is the answer.
The Recyclerview adapter method getAdapterPosition()
returns the sam value as the index in the ArrayList given to the Adapter.
All you have to do is fetch the index of the item you want to manipulate and then you can work with that.
If some one needs more details, then post a comment.