Last active
May 11, 2018 03:54
-
-
Save jungilhan/61d84fa07d678ac7839f0b1d1e1c868e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class NumberListAdapter : ListAdapter<Int, ViewHolder>(object : DiffUtil.ItemCallback<Int>() { | |
override fun areItemsTheSame(oldItem: Int?, newItem: Int?) = | |
oldItem == newItem // check uniqueness | |
override fun areContentsTheSame(oldItem: Int?, newItem: Int?) = | |
oldItem == newItem // check contents | |
}) { | |
... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment