Skip to content

Instantly share code, notes, and snippets.

View auras's full-sized avatar

Aurelian Dumanovschi auras

View GitHub Profile
@auras
auras / ShoppingListItemAnimator.kt
Last active May 28, 2018 14:48
How to disable the change animation for a specific item in RecylerView
package com.bonial.kaufda.shoppinglist
import android.support.v7.widget.DefaultItemAnimator
import android.support.v7.widget.RecyclerView
import com.bonial.kaufda.shoppinglist.adapter.OfferSuggestionListAdapterDelegate
open class ShoppingListItemAnimator : DefaultItemAnimator() {
private val pendingRemovals = mutableListOf<RecyclerView.ViewHolder>()
// We disable the change animation