Skip to content Skip to sidebar Skip to footer

Recyclerview - Changing Selected Item Icon Needs Two Clicks To Work

I am working on a mailing app, in which user can send the same mail to multiple contacts. When I open the contacts list I want to be able to click on the user and his profile pictu

Solution 1:

There's no need to call notifyItemChanged on the toggleSelection method. You are alredy changing the item manually with animations.

Calling notifyItemChanged is what causes the flickering, because it interferes with the animations.

Post a Comment for "Recyclerview - Changing Selected Item Icon Needs Two Clicks To Work"