android-persistence
android-persistence copied to clipboard
Extra argument "mBooksTextView" in step 3-5
After going through step 3 point 5, I observed that if you copy and paste the code provided from the tutorial here the code does not compile as there is an extra parameter in showBooksInUi(books, **mBooksTextView**);
The method showBooksInUi expects a List<Book> not a List<Book> and TextView
Just saw that too. The correct code for step 5 is this:
private void subscribeUiBooks() {
mViewModel.books.observe(this, new Observer<List<Book>>() {
@Override
public void onChanged(@NonNull final List<Book> books) {
showBooksInUi(books);
}
});
}