Created
November 27, 2017 01:44
-
-
Save larkintuckerllc/889827b7541812aeea526e716ec54547 to your computer and use it in GitHub Desktop.
Android Room: Beyond the Codelab - 9
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
... | |
mTodosViewModel.todos.observe(this, (todos -> { | |
new Thread(() -> { | |
DiffUtil.DiffResult result = DiffUtil.calculateDiff(new DiffUtil.Callback() { | |
... | |
}); | |
self.runOnUiThread(() -> { | |
result.dispatchUpdatesTo(todosAdapter); | |
mTodos = todos; | |
mProgressDialog.hide(); | |
}); | |
}).start(); | |
})); | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment