Reputation: 630
I use recyclerview for dynamic list. After insert and removed items recyclerview performs a sharp update. I use DefaultItemAnimator for more beautiful update I list.
optionList2.itemAnimator = DefaultItemAnimator()
I would like to try to increase the delay for the animation. Can you tell me how to do this?
Upvotes: 0
Views: 1182
Reputation: 2672
Use set(Change/Add/Move/Remove)Duration method:
optionList2.itemAnimator = DefaultItemAnimator().apply {
changeDuration = 250
addDuration = 250
moveDuration = 250
removeDuration = 250
}
Upvotes: 5