From 3d4f3a1d2a570677fbc9e0cdad7116bd43b99d4d Mon Sep 17 00:00:00 2001 From: Gabor Varadi Date: Wed, 17 Aug 2016 12:42:51 +0200 Subject: [PATCH] append declaration of adapter --- README.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b89d2d8..6e535c4 100644 --- a/README.md +++ b/README.md @@ -119,7 +119,15 @@ Which is created in the Activity. The adapter is set up like this - recycler.setAdapter(new BooksAdapter(this, realm.where(Book.class).findAllAsync(), booksPresenter)); +``` java +recycler.setAdapter(new BooksAdapter(this, realm.where(Book.class).findAllAsync(), booksPresenter)); +``` + +Where the adapter is a proper `RealmRecyclerViewAdapter`: + +``` java +public class BooksAdapter extends RealmRecyclerViewAdapter { +``` And the writes are from the UI thread to a background thread using `executeTransactionAsync()`, found in the presenter.