A brief analysis of the internal workflow of notifyDataSetChanged

First of all, we know that notifyDataSetChanged is a method of Adater. It is mainly used to notify ListView and tell it that the data of Adapter has changed and the display of ListView needs to be updated. Therefore, when the data content of Adapter changes, notifyDataSetChanged() method will be called. Take a look directly […]

Stop notifyDataSetChanged(), use DiffUtil to make your RecyclerView more silky

Table of Contents scene introduction DiffUtil how to use code analysis ReyclerView.ListAdapter Let’s see how to use it first Source code analysis Scene introduction First introduce MVVM I believe everyone is already very familiar with ViewModel is responsible for providing data to View. Usually, we will observe the data changes of ViewModel, and refresh the […]