ExpensiveBelly / DiffUtilPlayground

DiffUtil Playground

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build Status

DiffUtilPlayground

  • What's DiffUtil?

https://developer.android.com/reference/android/support/v7/util/DiffUtil

  • But by looking at the implementation, I see it's coupled with Android (import androidx.recyclerview.widget.RecyclerView.Adapter;), how do I test it?

That's the reason I created this repo.

  • How do I run DiffUtil?

Open DiffUtilRunner.kt and run main(). Change the lists as needed. There are some tests.

Objectives of this project

  1. Ability to add tests for DiffUtil implementations
  2. Possibility of tweaking the algorithm to make it more efficient/performing
  3. Custom implementations of DiffUtil.Callback. In this repo, a custom implementation used for Groupie is showcased.

About

DiffUtil Playground

License:Apache License 2.0


Languages

Language:Java 75.6%Language:Kotlin 24.4%