I have been using SectionedRecyclerViewAdapter from https://github.com/luizgrp/SectionedRecyclerViewAdapter. It is working great. I would like to start adding some animations. I downloaded and installed the test/example app, and inspected the code for the animation example. I cannot understand what part of the code for the example makes the animations work as they do. Can anyone explain it?
Asked
Active
Viewed 55 times
1 Answers
1
Animations are triggered when any of the notify methods of the RecyclerView.Adapter
are called. In the example below the RecyclerView will animate the insertion of an item in a specific position:
adapter.notifyItemInserted(position);
The library provide extra notify methods to help trigger the animation for specific items of the sections, like this one.

Gustavo Pagani
- 6,583
- 5
- 40
- 71
-
Thanks Gustavo, I couldn't figure out why it was not working in my code. Your explanation helped a lot. – Ian Middelkamp Apr 20 '20 at 18:51