Created
May 27, 2017 13:28
-
-
Save miquelbeltran/51b3cb82769d99d94c53556dc4d0ff7d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class BooksViewModel extends ViewModel { | |
| private MutableLiveData<List<Book>> books; | |
| LiveData<List<Book>> getBooks() { | |
| if (books == null) { | |
| books = new MutableLiveData<List<Book>>(); | |
| } | |
| return books; | |
| } | |
| public void loadBooks(String query) { | |
| // Here we will load the books from the Google Books API | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment