Skip to content

Quick start with DiffUtil

Vitaly Vivchar edited this page Feb 22, 2018 · 6 revisions

Step 1: Enable the DiffUtil

mRendererRecyclerViewAdapter.enableDiffUtil();

Step 2: Override Equals and HashCode methods in all your models

public class SimpleModel implements ItemModel {
        ...

	public boolean equals(final Object o) {
		...
	}

	public int hashCode() {
		...
	}
}

Step 3: Just call the setItems method

mRendererRecyclerViewAdapter.setItems(yourModelList);