Bram Yeh
Bram Yeh
Sep 9, 2018 · 1 min read

I have seen someone disable animator when inserting, as

recyclerView.setItemAnimator(null);
notifyItemRangeInserted(int positionStart, int itemCount);
recyclerView.setItemAnimator(new DefaultItemAnimator());

https://developer.android.com/reference/android/support/v7/widget/DefaultItemAnimator

In my opinion, RecyclerView can set customized ItemAnimator. I will prefer to inherit SimpleItemAnimator and then disable removing animation by overriding

boolean animateRemove (RecyclerView.ViewHolder holder)
    Bram Yeh

    Written by

    Bram Yeh

    Lead Android & iOS Mobile Engineer at Yahoo (Verizon Media) Taiwan https://www.linkedin.com/in/hanruyeh/

    Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
    Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
    Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade