January 2018
Intermediate to advanced
434 pages
14h 1m
English
Vetoable can be especially useful if you use it in the Recyclerview adapter. Generally, you would assign data to the list directly and may call notifyDatasetChanged, but this is highly inefficient, as it will result in loading all the data again. We can use vetoable to check whether the content is the same by matching the old value and new value and can veto modification if it is the same. Also, we can use DiffUtils to just update the data that is changed. DiffUtils was introduced in Android support library 26.01 and later versions, and makes RecyclerView much more efficient.
Read now
Unlock full access