Skip to content

Instantly share code, notes, and snippets.

@Zhuinden
Last active December 22, 2017 13:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Zhuinden/ec51c0fb934cf6a358f15f0716cbf925 to your computer and use it in GitHub Desktop.
Save Zhuinden/ec51c0fb934cf6a358f15f0716cbf925 to your computer and use it in GitHub Desktop.
Monarchy article: RealmResults
RealmResults<Task> tasksSortedByDate = realm.where(Task.class)
.findAllSorted(TaskFields.DATE, Sort.ASCENDING);
tasksSortedByDate.addChangeListener((newTasks) -> {
adapter.updateData(newTasks);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment