Fixing bug with item update hack

https://github.com/vanadium/todos/commit/23aa8e2152bb5bedf0624ef9479a72a4dce4eb8e#diff-1ca15d9cf7f46da14c98641086bb70a0R139
introduced a hack to avoid an ItemChanged animation if another one was
already in progress for the same item, in order to prevent the
interrupted animation from interacting badly with the swipe
animator.

However, this hack used RecyclerView.getChildAt(int) to get the child
view to test (and fetch the view holder from via
RecyclerView.getChildViewHolder(View)). getChildAt is actually a
ViewGroup method, not a RecyclerView method, and is lower level and has
no notion of list items. As such, during an animation, it may actually
return a view that does not correspond with the view for the list item
at the requested position since additional views might be introduced
into the ViewGroup to perform cross-fades.

The correct way to do this actually gets the ViewHolder right off the
bat, via RecyclerView.findViewHolderForAdapterPosition(int).

Change-Id: I0655f916593dd286693496e7bbd9bfc41db22bfb
1 file changed