Created
February 15, 2018 08:33
-
-
Save Sinarahimi/ecc6634cf1b729d5aee3f7253c2ffbb8 to your computer and use it in GitHub Desktop.
This file contains 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
... | |
HomeViewModel homeViewModel = ViewModelProviders.of(this).get(HomeViewModel.class); | |
homeViewModel.getMovies().observe(HomeActivity.this, movieList -> { | |
if (movieList != null) { | |
ArrayList<Movie> movieArrayList = new ArrayList<>(movieList); | |
homeAdapter = new HomeAdapter(HomeActivity.this, movieArrayList); | |
InfiniteScrollAdapter wrapper = InfiniteScrollAdapter.wrap(homeAdapter); | |
discreteScrollView.setAdapter(wrapper); | |
} | |
}); | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment