android-persistence icon indicating copy to clipboard operation
android-persistence copied to clipboard

Extra argument "mBooksTextView" in step 3-5

Open giorgosart opened this issue 8 years ago • 1 comments

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

giorgosart avatar Jan 01 '18 21:01 giorgosart

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);
            }
        });
    }

josenaves avatar Jan 23 '18 17:01 josenaves