Created
September 7, 2017 02:39
-
-
Save josh-burton/122871d59d04646e0b2734d2aa6b59de to your computer and use it in GitHub Desktop.
MapMe - add items
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
// add new data and tell the adapter about it | |
items.addAll(myData) | |
adapter.notifyDataSetChanged() | |
// or with DiffUtil | |
val diff = DiffUtil.calculateDiff(myDiffCallback) | |
diff.dispatchUpdatesTo(adapter) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment