/recyclerview-insert-delete

Playground for RecyclerView insertion and deletion

Primary LanguageKotlin

UI example

Random subset of countries' names are added to the list. (To show more or fewer countries initially, simple adjust numItems inside MainActivity) On "Add random" button click, a random UUID string is added to a random position in the list

Usecases

Simple insertion and deletion

Branch: https://github.com/ericntd/recyclerview-diffutil-demo/tree/insert-delete-simple

ReyclerView insert delete simple

Advanced insertion and deletion

When we need display the position of each item in the list

Branch: https://github.com/ericntd/recyclerview-diffutil-demo/tree/insert-delete-maintaining-position

ReyclerView insert delete advanced