Bram Yeh
1 min readSep 9, 2018

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)

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

Bram Yeh
Bram Yeh

Written by Bram Yeh

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

No responses yet

Write a response