Skip to content

Commit

Permalink
append declaration of adapter
Browse files Browse the repository at this point in the history
  • Loading branch information
Zhuinden authored Aug 17, 2016
1 parent 216b51d commit 3d4f3a1
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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<Book, BooksAdapter.BookViewHolder> {
```

And the writes are from the UI thread to a background thread using `executeTransactionAsync()`, found in the presenter.

Expand Down

0 comments on commit 3d4f3a1

Please sign in to comment.