In the ViewHolder of my RecyclerView, I have a method that is called to animate the alpha value of one of its TextViews. The ViewHolders are registered to a global notifier in onBindViewHolder
and unregistered in onViewRecycled
. When notified, all visible ViewHolders run the animation immediately. Those that are binded to but not currently visible end up delaying the animation until it's visible. My expectation would be that the animation for these ViewHolders would have either already started, or would be skipped entirely.
I've also created a Gist for the class used in the example.
My fix is to only run the animation for ViewHolders that are visible. I'm asking this question mostly for enlightenment and also to make sure I'm not missing something here.